Question:

For binary search, the list is in ascending order and the key is present in the list. If the middle element is less than the key, it means:

Show Hint

Binary search halves the search space: if mid<key → go right; if mid>key → go left.
Updated On: Sep 18, 2025
  • The key is in the first half
  • The key is in the second half
  • The key is not in the list
  • The key is the middle element
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Binary search condition.
If the list is sorted in ascending order, the binary search compares the key with the middle element.
Step 2: Case analysis.
- If \texttt{mid__element == key}, key found at mid.
- If \texttt{mid__element>key}, key must be in the left half.
- If \texttt{mid__element<key}, key must be in the right half (second half).

Step 3: Apply condition.
Since middle element<key, the key lies in the second half.
Final Answer: \[ \boxed{\text{The key is in the second half}} \]
Was this answer helpful?
0
0

Questions Asked in CUET exam

View More Questions