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.
I love when all planets after 7th are neptunes!
it's passed by reference because pointers are cheaper and faster than making a copy; and it's a
const
reference because the function does not need to, and should not, modify its input.my question is why the h is passed by refrence, and why it is also constant?
You can do the return (and using the i for the index) inside of the if, I think is better because the return itself ends the function.
Oh, sorry, forgot that part
HashSet
Will fail when there are uppercase letters, but clever solution
Would be a lot better to use StringBuilder, that thing is no joke 100 times faster