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.
Would love to write, but hate to review.
Where do you see a loop here? Cuz I don't. You probably mean indexing the array but thaht does not cause an enumeration of the array. indexing an Array is pretty much the fastest thing you can do, even faster than accessing a HashMap aka Dictionary by Key or most other data structures.
If someone writes code like this for such a simple thing, they will not bother to read more complex code knowing that it could have been coded simpler.
it is not efficient as it has to loop each and every single item. A switch statement is very efficient, it does not loop through items one by one. It uses dictionary algorithms behind the scene.
And this hard to read as well.
Strive for simplicity.
elegantly
beautiful
Very efficient but not easy to read
wow, this was a great and efficient way of doing it.
amazing...taught process
I like this one more than others in terms of being less obvious