We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The topic implies an interesting datastructure (e.g. "trie"), but a hash with the string as key and count as value is a simple and efficient solution. See github/bcreane for hash approach.
Maybe there's a way to lead us toward the data structure you were thinking of, and require intermediate steps be documented in stdout?
Btw, thanks for the problems :-)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
The topic implies an interesting datastructure (e.g. "trie"), but a hash with the string as key and count as value is a simple and efficient solution. See github/bcreane for hash approach.
Maybe there's a way to lead us toward the data structure you were thinking of, and require intermediate steps be documented in stdout?
Btw, thanks for the problems :-)