City Guilds Model Questions Vol1 2025 Information Technology Question 33
Practice objective / multiple choice question 33 from the 2025 City Guilds Model Questions Vol1 Information Technology examination.
Consider the following fragment of a program: ``` for i = 1 to n for j = 1 to i if (j mod 3 = 0) then // operation taking Θ(log₂ j) time else // operation taking Θ(1) time ``` (a) Express the total running time \(T(n)\) in Θ‑notation as a function of \(n\). (b) If each elementary operation (the Θ(1) step) takes exactly \(1\) µs and the Θ(log₂ j) step also takes \(1\) µs per unit of \(\log₂ j\), determine the largest integer \(n\) for which the program finishes within \(2\) seconds.
Answer Options
About This Question
This is City Guilds Model Questions Vol1 2025 Information Technology Question 33. It is one of the objective questions from the 2025 City Guilds Model Questions Vol1 Information Technology examination.
Difficulty level: Hard .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.