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.
Not possible, because 'x' takes the first element of (sorted) queue.
But the list 'u' is not needed : never read except his size. Maintains a counter or decreasing 'n' will be enougth
And why in the hell a check is done on queue in loop condition, it grows constantly (2 add for 1 remove)
Summary : "while(true){...}" + "if(n--==0) return x;" instead of "u.Add(x);"
Except the gready pitfall, it's nice and clever
Hi,
Too late for that, unfortunately. Closing.
Please make requests on CW github instead of this page.