Gce Model Questions Vol1 2021 Computer Studies Question 50

Practice objective / multiple choice question 50 from the 2021 Gce Model Questions Vol1 Computer Studies examination.

Gce Model Questions Vol1 2021 Computer Studies Objective / Multiple Choice Medium Difficulty
Question 50 GCE_MODEL_QUESTIONS_VOL1 • 2021 • COMPUTER_STUDIES • objective

Given the following pseudo‑code, determine the asymptotic time complexity in Big‑O notation as a function of \(n\):\n\n``` for i = 1 to n: for j = i to n: if j mod i == 0: k = n while k > 0: k = k - i ```\nExplain each reasoning stage leading to the final complexity class.

Answer Options

A. O(n log n)
Correct Answer B. O(n^2)
C. O(n)
D. O(n^3)
Correct Answer
B
Correct Option:
O(n^2)

About This Question

This is Gce Model Questions Vol1 2021 Computer Studies Question 50. It is one of the objective questions from the 2021 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.

Unlock Full Access Available for Android & Windows
Chat with Support