Gce Model Questions Vol1 2019 Computer Studies Question 35
Practice objective / multiple choice question 35 from the 2019 Gce Model Questions Vol1 Computer Studies examination.
The following variant of bubble sort is used on an array of 10 distinct numbers:\n\nSET swapped = true\nSET pass = 0\nWHILE swapped AND pass < n-1\n SET swapped = false\n FOR i FROM 1 TO n-pass-1\n IF A[i] > A[i+1] THEN\n SWAP A[i], A[i+1]\n SET swapped = true\n ENDIF\n ENDFOR\n SET pass = pass + 1\nENDWHILE\n\nWhat is the maximum possible number of comparisons performed, and what is the minimum possible number of comparisons performed, for this array size?
Answer Options
About This Question
This is Gce Model Questions Vol1 2019 Computer Studies Question 35. It is one of the objective questions from the 2019 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.