Suppose we have a balanced binary search tree \(T\) holding \(n\) numbers. We…

PYQ GATE 2014

Suppose we have a balanced binary search tree TT holding nn numbers. We are given two numbers LL and HH and wish to sum up all the numbers in TT that lie between LL and HH. Suppose there are mm such numbers in TT. If the tightest upper bound on the time to compute the sum is O(nalog⁡bn+mclog⁡dn)O(n^a\log^bn+m^c\log^dn), the value of a+10b+100c+1000da+10b+100c+1000d is ______.

Attempted by 177 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…