Introduction to Big O Notation and Time Complexity (Data Structures & Algorithms #7)


Big O notation and time complexity, explained.

Check out ( a website for learning math and computer science concepts through solving problems. First 200 subscribers will get 20% off through the link above.
Special thanks to Brilliant for sponsoring this video.

This was #7 of my data structures & algorithms series. You can find the entire series in a playlist here:

Also, keep in touch on Facebook:



  1. I sat in class for the whole semester struggling to figure this out. Then I see your video and understand it in 30 mins. College is a joke.

  2. I just knew this topic because I have to take an exam for a job application but he explained it very well! I didn't know I can watch, listen and learn from a youtube video this easy. Omg thank you!

  3. how time complexity became 0(n2)???? if input itself is n2 . i think some correction is needed, the time complexity is 0(n) because for n2 inputs loop iterated n2 times.

  4. By far the most comprehensive explanation of time complexity and big O notation I've ever met, so simple and clear. Thank you!

  5. @7:14 T = an + b.
    n = size of array

    a & b are constants. What constants? You also call them "coefficients". What does this mean in context of the equation and the problem it's derived from?

    "a numerical or constant quantity placed before and multiplying the variable in an algebraic expression "

    T = cn^2 + dn + e — I'm lost. What does this represent?

  6. At 23.06 you wrote the time for total += i -> O(1) if we treat total = total + i then here we are doing assignment and arithmetic operation that is + so it should be O(2) right?

  7. After I finish my course I want to send this vid to my professor and tell him to explain it this way to make the student's life easier.


Please enter your comment!
Please enter your name here