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.
I don't get it. You iterate through the array only once. What if opposite direction pairs appear after you perform some other deletions?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Typically this solution get best running time, but rarely it get worst than 2 for loop statement (slower than 100 * times). Try to run this 1000 times and get 1 worst case.