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 wanted to approve the translation by melli0620, but Codewars didn't let me, because someone else changed the description in the meantime. The Codewars approval system can be quite frustrating. :-(
I didn't change anything in the translation created by melli0620, I just updated the description. Please approve it. Thanks!
Testing all 4^10 (ca. 1 million) 10-step paths will require solutions to be efficient. Many solutions for other languages scan the input string multiple times or use hash maps to count the directions. Such solutions may be too slow to pass these tests. But the Java translation also tests all 10-step paths, so I think that's OK.
Testing all 4^10 (ca. 1 million) paths will require solutions to be efficient. Many solutions for other languages scan the input string multiple times or use hash maps to count the directions. Such solutions may be too slow to pass these tests, but I think that's OK.
Thanks! Great stuff. I wanted to approve your translation, but Codewars doesn't let me, because someone else changed the kata description in the meantime. The Codewars approval system can be so annoying... :-(
I forked your translation, didn't change anything, just updated the description. Please approve it. Thanks!
Needs random test cases.
Great :)
Turns out that I'm not able to approve
--> "Failed to approve: must be able to coauthor to approve/reject translation"
Maybe my level is too low?
Thanks for the suggestions, I have incorporated them.
As the sample test cases I'd add those from the description:
Also can you remove the TODO's from the Sample tests description?
Other than that, nice work! I'd be happy to approve.
https://www.youtube.com/watch?v=yPYxQQglBGM
The hardest parts seem to (0) understand the problem in a meaningful way, (1) to optimize the solution so long that it passes all tests without timeout.
What happens when the input starts with a blank (that was explicitly stated as possibility)?
There may be a missing test.
Should we not better round to the nearest integer, e.g. for numerical stability?
There is missing a test, because this solution ignores when the sum of elements is 0, maybe something like
@Test fun givenA0sum_returns0() {
assertEquals(0, EqualSidesOfAnArray([1,-1])
}