Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I really liked this Kata!
Thanks that was lots of fun!
Fixed
raised as issue
C version generates warnings.
There are two example tests, but in the real tests (The ones when you press Attempt), there's random tests.
Is there only 2 tests or am I blind?
iirc, if it's in range, the chip is caught
Hello!
In JavaScript in console.log I have correct answer, but got error that result is different:
It is like my variable changes value when goes to tests.
Passed: 106 Failed: 6
Log
not rounded result= 0.1035017922163077
rounded result = 0.1
Expected: 0.1, instead got: 0.09
Log
not rounded result= 0.055450503948645403
rounded result = 0.06
Expected: 0.06, instead got: 0.05
What if the pirate ship reaches the right edge but there's a Navy ship in the range? Do I have to return false or true?
I tried to update the java version, but the reference solution is incorrect and cannot handle some of the edge cases. Since you (the author) still seems to be active, I'll let you update your solution. If you're not up to that, you can use mine instead of yours (just put a comment at the top explaining it).
You may find the full new test suite (with the internal solution updated) in this fork.
cheers.
I scrutinized the edge cases and it seems that the ones originally used were far from enough to purge some implementations. So I added 2x25 fixed tests to scan through a lot of possibilities and ensure the algorithm.
I updated the python test suite, but those tests needs to be added to the C++ and Java versions too.
cheers
confirmed, that's a hole in my solution. Good catch.
Looks much better, thanks. And yes I solved only the python version, idk about other languages.
Loading more items...