Gce Model Questions Vol1 2022 Computer Studies Question 50
Practice objective / multiple choice question 50 from the 2022 Gce Model Questions Vol1 Computer Studies examination.
A loop processes an array of n integers. For each i from 1 to n the loop performs a binary search on the sorted sub‑array of length i, which requires ⌊log₂ i⌋ + 1 comparisons. Derive a closed‑form expression for the total number of comparisons performed by the loop in terms of n, and state the asymptotic time‑complexity using Big‑O notation.
Answer Options
About This Question
This is Gce Model Questions Vol1 2022 Computer Studies Question 50. It is one of the objective questions from the 2022 Gce Model Questions Vol1 Computer Studies examination.
Difficulty level: Medium .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.