Skip to content
Advertisement

Transform trie class method to trie node method

my question is how to transform this method from the trie class into a method of the node class that doesn’t use the node as a parameter, I know that I have to make a first method on the tree like this:

JavaScript

But I don’t know how to make the transformation of the method into the node class.

This is the method of the tree that I want to transform into a node method without using root as parameter of the method:

JavaScript

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement