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'd say the main problem of your solution is that you are mutating the array and removing elements within your
map
function. The map function should only be used to map the elements to a different value, not to change the array itself. A function likereduce
makes it more apparent that elements are being omitted.You say that you didn't check the first letter, but that's actually correct as per description.
its a bad solution. it uses sorting and has suboptimal performance.
The original language is Ruby, which contains built-in methods to solve these katas. It may be not as simple in JS, but even then it would be a 7kyu, never 1.
Yes, hello. 8kyu are the easiest katas.
Practice makes perfect.
Keep grinding, mate! Sky is the limit.