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.
Jep. Real bummer.
Also, prea(?)ty code doesn't really matter here. If your solution doesn't run in O(n) time, you wouldn't get the test cases with longer input arrays to pass. Just come up with an algorithm that doesn't require more than 1 list traversal. That's the only issue in this Kata. The most obvious brute-force O(n^2) solution doesn't work (otherwise this would be a 7 Kyu Kata at best).
This comment is hidden because it contains spoiler information about the solution
Nice solution!