tree = [
‘a’,
[‘b’, ‘c’, [‘d’, ‘e’]],
‘f’,
[‘g’, ‘h’]
]
i. Draw a node/link diagram for the tree.
Answer:
ii. Find tree[1], tree[1][2] and tree[1][2][0].
Answer:
iii. Write code to access the node with the value ‘h’.
Answer:
iv. Draw a second node/link diagram showing the state of the tree after tree[3].append([‘i’, ‘j’, ‘k’]) is executed.
Answer:
I no try . I need answers part
New contributor
dipesh chaudhary is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1