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.
Java Fork enforcing that the swapping is done in-place, to align with the other languages. the author's original solution still passes the tests, so correct solutions should be preserved.
Approved
Javascript looks ok.
At least in Java (my solution returns a brand new list only based on values). I don't know for JS, C requires in place mutation.
Python translation
Rust translation
Is there any attempt to translate this kata into Python yet? Would allow more people to play. :)
Approved
fixed
added
The kata requires actually to return a linked list with swapped values, it doesn't check that the nodes from the input list have actually been swapped. It is not about
writ(ing) a method that swaps each pair of nodes in the list
(though it works too). The description could make this clearer.Add tag
Linked lists
Had a good time solving this kata, thanks
already got merge conflicts, not waiting for peer review, approved
Loading more items...