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.
wow, how simple. Elegant!
got me too
It doesn't matter if this is an acceptable solution for a beginner. The whole point of "best practice", is that it should be the algorithm/approach that a professional programmer would take on production ready code.
I think this solution is perfect for beginner.
maybe this one...? ;)
probably because it is clearer for beginners (if mostly beginners voted). HashMaps are a little more advanced for a 7kyu problem. I bet there is an even more sophisticated one-liner with streams which (again) would be too much.
A solution with O(n^2) runtime, inconsistent iteration, and poor spacing/readability is voted best practice?
Check my solution here for a readable solution which takes O(n).