Neco 2024 Computer Studies Question 28

Practice objective / multiple choice question 28 from the 2024 Neco Computer Studies examination.

Neco 2024 Computer Studies Objective / Multiple Choice Medium Difficulty
Question 28 NECO • 2024 • COMPUTER_STUDIES • objective

Consider the following pseudo‑code where \(n\) is a positive integer:\n\nfor i = 1 to n\n for j = i to n\n if (j mod i = 0) then\n k = n\n while k > 0 do\n k = k - i\n count = count + 1\n end while\n end if\n end for\nend for\n\nDetermine the asymptotic time‑complexity of the algorithm in Big‑O notation.

Answer Options

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

About This Question

This is Neco 2024 Computer Studies Question 28. It is one of the objective questions from the 2024 Neco 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