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 problem is the countLeaves() method. Think about it. Do you really need to count it every time? What if you store this count for each node as you add them to the trie.
Contacts
You are viewing a single comment's thread. Return to all comments →
The problem is the countLeaves() method. Think about it. Do you really need to count it every time? What if you store this count for each node as you add them to the trie.