Computer Sciences > Gate 2017 Set-1 > Array
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________.

Correct : a

Similar Questions

Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is _...
#638 Fill in the Blanks
Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is _...
#638 Fill in the Blanks
Consider the array representation of a binary min-heap containing 1023 elements. The minimum number of comparisons required to find the maximum in the heap is _...
#638 Fill in the Blanks

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......