Let A be an array of 31 numbers consisting of a sequence of 0's followed by a sequence of 1's. The Problem is to find the smallest index i such that A[i] is 1 by probing the minimum number of locations in A. The worst case number of probes performed by an optimal algorithm is _________

Since 0 are followed by 1, so we have a sorted array of 0 and 1 and we can apply binary search algorithm with some modification, which will rake maximum probes $ \left[\log_2\;31\right]=5. $

Suppose we have a balanced binary search tree T holding n numbers. We are given two numbers L and H and wish to sum up all the numbers in T that lie between L and H. Suppose there are m such numbers in T. If the tightest upper bound on the time to compute the sum is 0(n^{a} log^{b}n + m^{c} log^{d}n), the value of a + 10b + 100c + 1000d is ____.

Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of n nodes?