edited by
863 views

2 Answers

Best answer
3 votes
3 votes
It's so simple to solve this type of questions bro...

first you assume a tree which give different outputs for all your options, then run your algorithm by knowing the output you can tick corresponding option....

for this ans is height of the tree and assumed root of height = 1
selected by
2 votes
2 votes

Option d .

We can write like this type of recurrence relation . And we take a binary tree and execute this algo  we get height of binary tree.

Related questions

1 votes
1 votes
1 answer
1
3 votes
3 votes
1 answer
2
mcjoshi asked Aug 27, 2016
1,842 views
A binary tree has 127 nodes. Which of the following is an invalid height for this tree ?$a). 16 $$b). 6$$c). 21$$d). 43$
0 votes
0 votes
2 answers
3
Tushar Shinde asked Jan 15, 2016
911 views
I am stuck after JAN. It is not getting balanced even after 2 rotations. Can somebody help?