Big O Notation Explained for Beginners

preview_player
Показать описание
Check out my interview prep platform for learning the patterns!

Big O Notation is one of the most dreaded topics when first learning data structures and algorithms. Big O allows you to describe the performance of the code that you write in two different ways. The first way is execution time, AKA time complexity which tells you how long your code takes to run as the input changes. The second way is memory allocation, AKA space complexity which tells you how much memory your code will require each time it is ran.

When writing Big O Notation, we always want to drop constants from our analysis because we use the biggest term to describe the algorithm. Knowing how terms compare against one another is vital step in analyzing the complexity of your algorithms. There are many terms including constant, linear, quadratic, cubic, logarithmic, or exponential that all take a certain amount of time to run depending on the size of the input to our function.
Рекомендации по теме
Комментарии
Автор

Finally someone showed a chart. Great job!

angeloarellanogaona
Автор

Awesome! Thanks I was struggling to understand this but your video was super helpful!

annettefrehner
Автор

Great video. I was in over my head in another course and this broke it down "Barney Style". I did not find the follow-on videos you mentioned at the end of this one. Did you do recursion analysis?

patrickkelligan
Автор

Is the video on big O notation for recursion and other topics out yet? ;)

madhusudanr