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.
It's the shortest, sure, but the best? If I saw this in production code I would be kinda miffed because the return function is indecipherable.
This is, in my opinion, an inadequately constrained kata. It never explicitly states that the order of the face (eyes, nose, face) elements will always be the same, you just have to infer it from the test data.
This kata is obviously written by someone whose's not well-versed in English. Skipping this one.
I definitely wouldn't qualify this as "best practices" since it's creating an entirely new string
n
times (viastd::accumulate
). This is an O(k * n) solution, when it should be O(n). For high values ofn
andk
this is going to be sluggish.