Can linear search recursive algorithm and binary search recursive algorithm be…

2024

Can linear search recursive algorithm and binary search recursive algorithm be performed on an unordered list?

Answer: A. Binary search can’t be usedAnswer: a Explanation: As binary search requires comparison, it is required that the list be ordered. Whereas this doesn’t matter for linear search.

  1. A.

    Binary search can’t be used

  2. B.

    Linear search can’t be used

  3. C.

    Both cannot be used

  4. D.

    Both can be used

Attempted by 493 students.

Show answer & explanation

Correct answer: A

Answer: a

Explanation: As binary search requires comparison, it is required that the list be ordered. Whereas this doesn’t matter for linear search.

Explore the full course: Coding For Placement

Loading lesson…