edited by
1,723 views
1 votes
1 votes

The inorder traversal of the following tree is

  1. $2 \, \, \, 3 \, \, \, 4 \, \, \, 6 \, \, \, 7 \, \, \, 13 \, \, \, 15 \, \, \, 17 \, \, \, 18 \, \, \, 18 \, \, \, 20$
  2. $20 \, \, \, 18 \, \, \, 18 \, \, \, 17 \, \, \, 15 \, \, \, 13 \, \, \, 7 \, \, \, 6 \, \, \, 4 \, \, \, 3 \, \, \, 2$
  3. $15 \, \, \, 13 \, \, \, 20 \, \, \, 4 \, \, \, 7 \, \, \, 17 \, \, \, 18 \, \, \, 2 \, \, \, 3 \, \, \, 6 \, \, \, 18$
  4. $2 \, \, \, 4 \, \, \, 3 \, \, \, 13 \, \, \, 7 \, \, \, 6 \, \, \, 15 \, \, \, 17 \, \, \, 20 \, \, \, 18 \, \, \, 18$
edited by

1 Answer

Best answer
2 votes
2 votes
2 4 3 13 7 6 15 17 20 18 18

left - node  - right is the order of inorder traversal

if it was binary search tree inorder traversal is easy to write - in order traversal of binary search tree give the nodes in ascending order
Answer:

Related questions

3 votes
3 votes
2 answers
1
go_editor asked Aug 8, 2016
3,876 views
The hash function used in double hashing is of the form:$h(k,i)=(h_1(k)+h_2(k)+i) \: mod \: m$$h(k,i)=(h_1(k)+h_2(k)-i) \: mod \: m$$h(k,i)=(h_1(k)+i \: h_2(k)) \: mod \:...
4 votes
4 votes
1 answer
2
2 votes
2 votes
1 answer
3
go_editor asked Jul 30, 2016
2,057 views
Level order Traversal of a rooted Tree can be done by starting from root and performing:Breadth First SearchDepth First SearchRoot SearchDeep Search