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.
It seems I broke the rule from the problem statement, but I can't remember to have read that by the time I implemented my solution (it was 8 yeas ago, by the way).
The list is sorted. I think you can avoid using the set.
This comment is hidden because it contains spoiler information about the solution
Maneiro que vc conseguiu fazer esse desafio. Eu fiquei muito tempo para resolver, mas um dia veio o insight e a solução saiu.
This comment is hidden because it contains spoiler information about the solution
Yes, I realize that when I submitted. Thanks for the advice.
Python tests are unordered but is easy to deal with that.
The main problem is that the random inputs have always an extra element. In this example there is an extra "-2" that does not make any sense.
It should work for random inputs too: ['8', '6', '-1', '6', '9', '1', '9', '0', '4', '-4', '-1', '1', '5', '-4']
should equal ['8', '6', '-1', '6', '9', '1', '9', '0', '4', '-4', '-1', '1', '5', '-4', '-2']
Cool. Didn't know that. Thanks.
That's true. Just submited the same solution used by the "did I finish my sudoku" kata, changing just the return value, and it worked smoothly.
The tests pass with O(3) solutions. I would like to see O(2) solutions, like the author suggest. I think mine is O(2), but I would like to confirm author's solution.
Does the number of times you retry to run the solution affect the number of honor you earn?
"It will never give you an empty array (that's not a walk, that's standing still!).""
It's not true. I'm printing the input walk array and the random tests generated one:
[]
True should equal False
The testcases could check for malformed values. It would be an extra challenge.
Well done. I really like the simplicity of your solution. Mine is similar, but not so simple. Congratz.