Computer Science · Algorithms
n तत्वों की एक सूची numList और कुंजी मान K दिया गया है, बाइनरी सर्च एल्गोरिथ्म अर्थात BinarySearch(numList, key) का उपयोग करके numList में कुंजी K की स्थिति खोजने के लिए निम्नलिखित चरणों को व्यवस्थित करें: (A) mid = (first+last)//2 की गणना करें (B) SET first = 0, last = n-1 (C) PRINT 'खोज असफल रही' (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)
सही उत्तर देखें
(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 Computer Science 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