Back to the 2024 paper

Module 1: Introduction

20242m

If an algorithm has time complexity T(n)=5n2+3n+7T(n) = 5n^2 + 3n + 7, its asymptotic upper bound is:
(i) O(n)O(n)
(ii) O(n2)O(n^2)
(iii) O(nlog⁡n)O(n \log n)
(iv) O(n3)O(n^3)

Worked SolutionAI Assisted

Answer: (ii) O(n²)

5n² dominates 3n+7; tight upper bound is O(n²). O(n³) also upper but not minimal.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.