City Guilds Model Questions Vol1 2021 Information Technology Question 38

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

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

The following recursive function computes a value for a non‑negative integer \(n\): ``` function f(n): if n <= 1 then return 1 total = 0 for i = 1 to n do total = total + f(i-1) * f(n-i) return total ``` Determine the value returned by \(f(5)\) and state the asymptotic time‑complexity of this algorithm in Big‑O notation.

Answer Options

A. f(5)=30; time complexity = O(n^2)
B. f(5)=14; time complexity = O(2^n)
Correct Answer C. f(5)=42; time complexity = O(2^n)
D. f(5)=42; time complexity = O(n!)
Correct Answer
C
Correct Option:
f(5)=42; time complexity = O(2^n)

About This Question

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