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

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.