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.
How is this a top rated solution?
Brilliant! I have no idea how these people come up with this kind of solution.
High quality solution, in my opinion.
nice, but if you iterate through the vector you will avoid many unnecessary arithmetic in your code
The complexity is terrible. Sorry, even if it is a clear solution, is really bad practice.
this is very unreadable, you know you dont have to use a function library for everything, loops exist and etc.
I'd like to use
pNext
in replace ofp
as the iterative index, because p0 is deemed as the initial value, and we shouldn't change its context meaning.you could have used greater() in sort function to sort in decending order.
I always forgot about Big O. I have made the same mistake.
O(n^2) Bad time complexity. Should be done in O(n)
Good to know!
I agree that the parameter names are poorly chosen, but instead of comments, you could just change them to more telling ones ;)
Use spoiler flag next time, please.
This comment is hidden because it contains spoiler information about the solution
can someone explain to me what happens in the loop ,thank you in andvance
Howcome this is a clever solution??
Loading more items...