Computer Science, asked by opbhardwajiem302, 1 year ago

The preorder traversal of a binary search tree with integer values produces the following sequence: 35, 23, 26, 46, 40, 39, 41, 52. What is the value of the right child of the root of the tree?

Answers

Answered by aliasif96008
10

It's 39

As arranging The numbers in pre-order traversal we get this.

See image for more clarification.

Attachments:

rounakpal1999: This answer is wrong. The correct answer is 46
Answered by ankurbadani84
7

Answer :-

The pre order traversal of a binary search tree with integer values produces the following sequence - 35, 23, 26, 46, 40, 39, 41, 52

Arranging the same as below.

             35

        /             \

       23            39  

      /     \           /    \

    26    40     41    52  

     \        /

     46   39

Right child of the root of the tree - 39

Similar questions