# Questions & Answers of Searching

## Weightage of Searching

Total 3 Questions have been asked from Searching topic of Algorithms subject in previous GATE papers. Average marks 1.67.

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 _________