HACKER Q&A
📣 lamentus

How to learn the Big O Notation?


Hello, I would like to learn about the Big O Notation and I am looking for good resources. Unfortunately I can not find anything better than few minutes long videos on Youtube. Could you please recommend me something? Thank you


  👤 st1x7 Accepted Answer ✓
If you only want to learn about a single fairly small concept like Big O, youtube is great - https://www.youtube.com/watch?v=Q_1M2JaijjQ. (good explanation, longer than a few minutes, and a great channel in general)

If you want to get deeper (or wider?), you can get a textbook (e.g. Introduction to Algorithms by Cormen) or a university course like MIT 6.006 but obviously those will contain a lot more than just this topic.


👤 giantg2
What exactly are you looking to learn that youtube is not showing you?

The basic concepts of Big O should be well explained on YouTube. If you are looking at calculating time complexity for larger program flows, then you need to learn about mapping the process flow, figure out the complexity of each piece of that process and how it is invoked, then create an algebraic representation of that information.


👤 viraptor
Have a look at proper courses. For example https://ocw.mit.edu/courses/find-by-topic/#cat=engineering&s... should have it. Check the "Introduction to Algorithms" ones.

👤 frompdx
I recommend reading "Grokking Algorithms". It covers a variety of algorithms and their notations. Intended for beginners and even non-programmers, it breaks algorithms down step by step and has lots of pictures to relay the information to the reader.

👤 mmvs
I heard good things about Algorithms course by Princeton university on coursera