• edited by
999 views
0 0 votes

what i did {$2^{h+1}-1=100$} so i found h=6 so max swaps needed would be 6

please check it or tell me if i iam wrong

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
2 answers 2 answers
2.0k
2.0k views
Bikram asked May 26, 2017
1,950 views
What will be the running-time of Dijkstra's single source shortest path algorithm, if the graph $G(V,E)$ is stored in the form of an adjacency list and binary heap is use...
4 4 votes
1 answers 1 answer
966
966 views
Bikram asked Oct 4, 2016
966 views
Maximum element in a min-heap represented by an array, can be computed in _____ time$O(n)$$O(\log n)$$O(n \log n)$ but not $O(n)$$O(1)$
3 3 votes
1 1 answer
2.4k
2.4k views
Prince Sindhiya asked Oct 23, 2018
2,415 views
Anand want to send a Love Letters(LL) to his girlfriend. Due to confidentiality problems he was used only combination of either '0' or ' 1 ' characters. He also maintaine...
1 1 vote
1 1 answer
1.0k
1.0k views
Prince Sindhiya asked Oct 23, 2018
1,008 views
What is the time complexity of the following code?int fun1(int $x$, int $y$ )\{ if(x == 0)return y;elsereturn fun1(x-1, x + y);} $O\left(x^{2}\right)$$\mathrm{O}(\mat...