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.
The expected result is a universe in which the input is sorted in
O(n)
.Yes, this is impossible in classical physics, that's the whole point.
Going to the comments section was the best decision I made in a long time ;)
This is great info, thanks!
Your code probably mutates the input list.
Not a suggestion for this specific kata
OK, but trying to understand the description should never be part of the task.
Already raised as issue ~~
Example tests are not specifications.
Add the
puzzle
tag.Duplicate issue
.
this is what i understand is going on:
Lyanna shared 50 (or put in 50) and then borrowed (or took out 500). so in total Lyanna borrowed (took out) 450. but the 'kitty' is shared 50/50, so half of what Lyanna took out is for her to use, and the other half (225) should be for Elia. So Lyanna owes Elia that 225. hopefully that makes sense...
rank updated
There are no nested loops, so not O(n^2).
Why do you think it's O(n^2)? It creates an extra list and doesn't terminate early but it's O(n).
Loading more items...