City Guilds Model Questions Vol1 2023 Information Technology Question 14

Practice objective / multiple choice question 14 from the 2023 City Guilds Model Questions Vol1 Information Technology examination.

City Guilds Model Questions Vol1 2023 Information Technology Objective / Multiple Choice Hard Difficulty
Question 14 CITY_GUILDS_MODEL_QUESTIONS_VOL1 • 2023 • INFORMATION_TECHNOLOGY • objective

Consider the recursive function defined for non‑negative integers: \[ f(n)=\begin{cases} 1, & n\le 1\\[2mm] f(n-1)+2\,f(n-2), & n>1 \end{cases} \] (a) Compute the value of \(f(5)\). (b) State the asymptotic time‑complexity of a naïve implementation that follows this definition, using big‑O notation.

Answer Options

A. f(5)=19; time complexity O(2^n)
B. f(5)=23; time complexity O(2^n)
C. f(5)=21; time complexity O(n^2)
Correct Answer D. f(5)=21; time complexity O(2^n)
Correct Answer
D
Correct Option:
f(5)=21; time complexity O(2^n)

About This Question

This is City Guilds Model Questions Vol1 2023 Information Technology Question 14. It is one of the objective questions from the 2023 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.

Unlock Full Access Available for Android & Windows
Chat with Support