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.
this is legit dope
no need for
? 1 : 0
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
)very clever
isn't this very inefficient? I mean, using push_back every iteration leads to multiple reallocation, instead wouldn't it be better to initialize output vector with known size n?