It's UWAweek 17 (1st semester, week 8)

help2200

This forum is provided to promote discussion amongst students enrolled in CITS2200 Data Structures and Algorithms.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 95 articles.
Currently no other people reading this forum.


 UWA week 15 (1st semester, week 6) ↓
SVG not supported

Login to reply

👍x2
helpful
11:59pm Fri 12th Apr, ANONYMOUS

No, the answer is A. "f(n) is O(g(n))" basically means the graph of f(n) will be bounded by the graph of g(n) at some point, and multiplied by some constant factor. And the notation is confusing because it's "=", but think of it as "<=" so O(n) = O(n^2) is true. so is O(n) = O(n^2) and O(n) = O(n^1000) or O(n) = O(2^n). Just like 1 < 2, and 1 < 4, 1 < 1000. Using the definition: O(nlogn) = O(n^2). We need to find c and n0 satisfying: f(n) <= cg(n) for n > n0. in our case nlogn <= cn^2 [for n > n0] take c = 1 and n0 = 10: nlogn <= 1n^2 Which is true, when n > 10, this above will always be true.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy