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.
Definitely, it should be '6 kyu' and tagged as 'algorithms'.
Usually, a solution is obvious for '7 kyu', but not here.
Usually, for '6 kyu' and for this kata specifically, you must Find a solution, I think.
'7 kyu' examples:
https://www.codewars.com/kata/5828713ed04efde70e000346
https://www.codewars.com/kata/544a54fd18b8e06d240005c0
https://www.codewars.com/kata/57ecf6efc7fe13eb070000e1
This comment is hidden because it contains spoiler information about the solution
It's too slow with at least O(n * 3) and unreadable.
It can be solved in simple way with O(n).