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 know it has been 8 years and you're probably very aged now compared to the time you wrote this comment. In case you're still somehow openeing codewars still I would like to ask what book did you learn from, supposing you already learnt it since it has been alot of time.
This comment is hidden because it contains spoiler information about the solution
Very readable and logical. Oh, this language design...
I think in question it is specifically mentioned that hashcode & equals contract has been already taken care of So no need to worry about that key collision. But still yes to be on more safer side we can use this Identity hashmap.
If we make a concatenation of string is better to declare a "std::stringstream" instead of "std::string"?!?
Why?
Thank you for sharing the tip with the IdentityHashMap. I did not know about IdentityHashMap. That's why I used a LinkedList and the '==' operator. I didn't realized that I also could put the object identity to a map :-D
Why is that ?
I did not know about IdentityHashMap, thanks for sharing! That would definitely work here.
When I used a HashMap, I used Node.toString() as the key. Now I understand that I was making an assumption that the toString() and hashCode() methods where no overridden in a way that would break my HashMap.
added a brief warning at the bottom of the description. thanks for the feedback!
Well, that's to be expected, no?
This comment is hidden because it contains spoiler information about the solution
Now really fixed, thank you! :)
Not fixed as far as I can tell.
I did.
25 million, not 40, sorry.
This comment is hidden because it contains spoiler information about the solution
Loading more items...