1.

Which of the following step is taken after finding an element having value greater than the element being searched?(a) linear search takes place in the forward direction(b) linear search takes place in the backward direction(c) binary search takes place in the forward direction(d) binary search takes place in a backward directionThe question was asked in an interview.This key question is from Searching in section Searching of Data Structures & Algorithms II

Answer»

Right ANSWER is (b) linear SEARCH takes place in the BACKWARD DIRECTION

Best explanation: First an element having value greater than the element being searched is found. After this linear search is performed in a backward direction.



Discussion

No Comment Found

Related InterviewSolutions