Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Asymptotic Notations 2/2 | Introduction to ADS
Data Structure & Algorithms PART I
course content

Course Content

Data Structure & Algorithms PART I

Data Structure & Algorithms PART I

1. Introduction to ADS
2. Data Structures Part I
3. Trees Part I
4. Trees Part II

bookAsymptotic Notations 2/2

How to pronounciate the evaluation?

Speaking about the first case candies problem, we may say: In the worst case, the complexity will be O(n) (n - the number of candies).

Speaking about the second case candies problem, we may say: In the worst case, the complexity will be O(n log n) (because it is a Binary Search algorithm; we will talk about that later).

There are a lot of evaluations that show the limits of time complexity.

O-little (o(n)), for example, is used to describe an upper bound that cannot be tight. Omega notation (Ω(n)) represents the lower bound of the running time of an algorithm.

OperatorThe name
=θ(n)
O(n)
<o(n)
Ω(n)
>ω(n)

By exploring the picture, we can decide which time complexity is the best for the algorithm and which is the worst.

As we decided earlier, sometimes we have a choice to buy a more expensive washer machine (O(n)) or cheaper (O(n log n), for example). There are many cases where we have only one possible way to cope with the problem, so we need to buy that only one washing machine.

Best, worst, average

Mostly used. Best case (Big-O or O(n) )is the function which performs the minimum number of steps on input data of n elements.

Worst case (Omega or Ω(n)) is the function which performs the maximum number of steps on input data of size n.

Average case (Theta or θ(n)) is the function which performs an average number of steps on input data of n elements.

question-icon

Choose the correct ascending order of big-O time complexity.

<<<<<<

Click or drag`n`drop items and fill in the blanks

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 4
some-alt