Gce Model Questions Vol1 2024 Computer Studies Question 15
Practice objective / multiple choice question 15 from the 2024 Gce Model Questions Vol1 Computer Studies examination.
The following pseudocode implements insertion sort on an array A[1…n]: FOR i = 2 TO n key = A[i] j = i - 1 WHILE j > 0 AND A[j] > key A[j+1] = A[j] j = j - 1 ENDWHILE A[j+1] = key ENDFOR Assuming the input array is initially sorted in strictly descending order, how many comparisons between array elements and the variable `key` are performed when the algorithm runs on an array of size \(n = 10\)?
Answer Options
About This Question
This is Gce Model Questions Vol1 2024 Computer Studies Question 15. It is one of the objective questions from the 2024 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.