edited by
839 views
2 votes
2 votes

Consider the following routine on binary tree

void do(struct btnode *t)
{
    if(t)
    {
        Do(t->Rightchild);
        Do(t->Leftchild);
        swap(t->Rightchild,t->Leftchild);
        
    }
}

1) What does Do(t) do on following binary tree  after running the code?

a)

b)

edited by

Please log in or register to answer this question.

Related questions

1 votes
1 votes
0 answers
1
Nandkishor3939 asked Jan 25, 2019
634 views
I think its answer is 8 .Please ,can any one make it sure for me :)
0 votes
0 votes
1 answer
2
Prince Sindhiya asked Jan 2, 2019
705 views
A full binary tree is a tree in which every node other than the leaves has two children. If there are 600 leaves then total number of leaf nodes are?
2 votes
2 votes
3 answers
3
4 votes
4 votes
2 answers
4
Parth Shah asked Dec 11, 2018
1,386 views
Suppose binary tree has only three nodes A,B and C, and you are given the post order traversal of tree as B-A-C . The exact pre order traversal of the tree is?A)C-A-BB)A-...