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 _...
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 _...
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 _...
Total Unique Visitors
Loading......