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.
In my opinion, this is the best solution!
NO! This solution is (n log n). Ideal is O(n).
how
best one
Sorting is O(n log n). Optimal is O(n).
This error stems from vectors having only 1 element or empty vectors. In that case numbers[1] has no meaning.
I have been trying the same solution, but have error: "Process exited prematurely with a SIGSEGV signal.". Why your solution have been accepted but mine not. How it could be acceptable without chacking empty vector and 1 sized vector?
std::vector<std::vector>::size_type might be bigger than int
Perfect