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.
Approved, thanks!
I've added the algorithms tag as suggested, but just for your information, the ranks of kata is almost never changed unless they are very wrong (eg. a 6kyu kata being ranked at 4kyu) and have very few solves.
Also one reason this one is 7kyu instead of 6kyu is that the tests are purposely kept small so that pretty much any algorithm will work, it doesnt need to be anything very fast.
Also there is the Valid Braces kata which is perfectly ranked at 6kyu and certainly more difficult than this kata.
A solution being "obvious" is not a matter of the difficulty of the challenge, but of the experience of a user. The requirement of having to think before arriving at a solution is similarly dependent on the skills and experience of the solver. In other words: you are projecting. As for this kata, since the solution pretty much only involves the arcane art of "counting", the given difficulty is appropriate.
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
I believe that array is itterated through 3 times. this will be slow when data size grows.
Done, it was implied tho.
This comment is hidden because it contains spoiler information about the solution
is it because of the multiple methods? like filters?
i wanna know more about time complexities.
It's too slow with at least O(n * 3) and unreadable.
It can be solved in simple way with O(n).