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.
You are misunderstanding the question.
The tuple in
swaps
indicate the position where the swapping takes place. As inThe first swap moves the ball from 0 to 1
The second swap moves the ball from 1 to 2
The final swap doesn't affect the position of the ball. (Because ball is currently at index 2, so the swapping of 0th-indexed and 1st-indexed cup do not affect the ball)
Note that we are only concerned of the final position of the ball and not the validity of each swapping nor the index / position of invalid swaps.
Can someone help me in this kata description example?
(start = 0 ; swaps = [(0, 1), (2, 1), (0, 1)] ) --> 2
Ball from 0 go to 1 then 2,1 is invalid, and 0,1 is also invalid? Then the answer should be 1? I didnt see any move end in 2?
The description warns you:
that's the main issue. when you fix that, that test will work (but another is still failing, there are some out-of-order calls). In any case, that's a problem with your code , not a kata issue
is never a good argument, especially not with threading and concurrency ;-)
done for Ruby
done
it may be a bit redundant to make the Human class abstract here, since there are no methods or attributes inherrited by man or woman, so theres no common behavior to impliment
for readability and maintainability, it would be bette to split the code,
store the result of the first collect in a local variable with a meaningful name.
then on a separate line stream the results and do the needed operations
How can I view the preloaded code or merely it's API?
One of the best Kata challanges I came across here...Real life and practical one...Thank you.
the code you pasted passes the tests as of now, so we cannot replicate the issue
;-)
done with backwards-compatibility
done for JS
added to JS
Rust translation
Loading more items...