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.
in the for-loop, no need to check whether
wariors
actually containsc
;wariors[c] == 0
ifc
is not inwariors
(actually the first time it is added with default value0
)In your
for
-loop you are searching in yourmap
twice. The first time when you callfind
and the second time when you callat
. You can improve your performance by usingsearch->second
instead ofwarriors.at(c)
.