Computer Science · Algorithms
Given a list numList of n elements and key value K, arrange the following steps for finding the position of the key K in the numList using binary search algorithm i.e. BinarySearch(numList, key): (A) Calculate mid = (first+last)//2 (B) SET first = 0, last = n-1 (C) PRINT 'Search unsuccessful' (D) WHILE first key, THEN last = mid-1 ELSE first = mid + 1
- 1(D), (A), (B), (C)
- 2(B), (A), (D), (C)✓
- 3(D), (B), (A), (C)
- 4(A), (B), (D), (C)
Correct answer
(B), (A), (D), (C)
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Algorithms?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Algorithms