Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Asymptotic Notations 1/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 1/2

If you want a new washing machine, you will probably look for the cheapest and the best option.

The cheapest option in computer programming means you spend less memory and time for the algorithm to perform.

Sometimes there is only one expensive washing machine in the shop, so you need to buy that one. If you have the choice, you will probably buy a cheaper one that fits all your needs.

Big-O Notation is one of the most fundamental tools for analyzing the cost of an algorithm.

To show the complexity of the algorithm, it is shown as O(f(n)).

Imagine that you want to find the blue candy among different candies using computer programming.

The easiest way is to study every candy and find the blue we need.

If the fifth candy is blue - the algorithm will be stopped at this step. Congratulations!

This blue candy can be the last element of the heap, so you will spend so much time trying to find this blue candy :(

And now imagine if your computer sorts your candies first like a rainbow, and then you will start finding blue candy in the cold color candies. After that, you will go to blue-colored sweets and already find your candy at the end.

The first way to find the candy id is called Brute force, and we use it in programming, but every time we perform any actions in the programming, it is needed to try to minimize it. That’s why we need to evaluate the time/memory spent to perform anything to choose the cheapest one.

In the candy task we reached the main goal: we performed our algorithm with lower complexity.

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 3
some-alt