Let us conthe Tree shown in the above figure
root = Node ( 10 ) NEW_LINE root . left = Node ( 20 ) NEW_LINE root . right = Node ( 30 ) NEW_LINE root . left . left = Node ( 40 ) NEW_LINE root . left . right = Node ( 50 ) NEW_LINE root . right . right = Node ( 70 ) NEW_LINE print " Given ▁ Tree " NEW_LINE preorder ( root ) NEW_LINE struc = [ ] NEW_LINE data = [ ] NEW_LINE EncodeSuccint ( root , struc , data ) NEW_LINE print   " NEW_LINE Encoded Tree " NEW_LINE print " Structure ▁ List " NEW_LINE