Computer Science, asked by divyamathangi, 1 year ago

the pre order traversal of binary search tree is 10,5,1,7,40,50 what traversal of the tree?​

Answers

Answered by venkatavineela3
18

Answer:

Explanation:

preorder follows the sequence as 10,5,1,7,40,50 it means root comes first then left subtree and then right subtree.

now the inorder sequence will be 1,5,7,10,40,50

because as this is a binary search tree the inorder will be in increasing order of the elements

postorder follows as:right subtree , left subtree and then root

50,40,7,1,5,10

Answered by 0o2
1

Answer:

preorder follows the sequence as 10,5,1,7,40,50 it means root comes first then left subtree and then right subtree.

now the inorder sequence will be 1,5,7,10,40,50

because as this is a binary search tree the inorder will be in increasing order of the elements

postorder follows as a right subtree, left subtree, and then root

50,40,7,1,5,10

Explanation:

preorder follows the sequence as 10,5,1,7,40,50 it means root comes first then left subtree and then right subtree.

now the inorder sequence will be 1,5,7,10,40,50

because as this is a binary search tree the inorder will be in increasing order of the elements

postorder follows as right subtree, left subtree, and then root

50,40,7,1,5,10

Similar questions