I have a heap with $n$ elements. $k$ represent a number that is the height of one of the elements in the tree.
I need to compare two run times and prove what i claim.
The 2 run times are: $$ (1)O(\lg n \cdot (\lg n - k)) $$
And: $$ (2)O(2^k \cdot \lg n) $$
Where: $$ \lg n - k $$ Is a constant value.
For the first run time formula, its seems that we get: $O(\lg n)$
But how do i find the run time (and prove) for the second run time?
Thanks.
run time [for a] second run time
c) Comparing the efficiency of 2 run times $\endgroup$ – greybeard Sep 13 '20 at 15:52