How to edit structure of tree in code to use tries


#1

how to edit structure of tree in code to use tries


#2

You can use dictionary in place of right and left node.
When you need to add child to parent add it to dictionary.
class Node:
def init(self,ch):
self.ch=ch
self.d={}