Yes. Exceptions shouldn't be used for flow control. In a real setting, you'd probably parse it as a long (and possibly catch that exception) then check the size for the actual type.
That being said, it is really easy to see what is happening, which is good.
you write whats under the Math.min function so dont fell dumb, now you know how to make it faster
Yes. Exceptions shouldn't be used for flow control. In a real setting, you'd probably parse it as a long (and possibly catch that exception) then check the size for the actual type.
That being said, it is really easy to see what is happening, which is good.
And it looks pretty. :-)
Wouldn't the code be slower because of the try-catch check?
This comment is hidden because it contains spoiler information about the solution
this is best code bro
This is actually the best solution instead of using random loops.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
fair chance you did not import the "System" namespace (line1)
How did you get the Kata to let you use "Math"
When I tried that it said that "Math does not exist in the current context"
2nd Time I Got Top answer, lets go
read the assertion message, not the line of code:
why the test
do_test("", "ac", "ab", false)
return false :) isn't the part1 contain "" in its?God i love haskell
when you want to solve a problem, better way is using the fundamentals of the language not the built-in function.
Loading more items...