Big Oh Notation - Definition & Example

Sdílet
Vložit
  • čas přidán 9. 02. 2019
  • If my videos have added value to you, join as a contributing member at Patreon: / sunildhimal
    Learn about Big Oh asymptotic notation - Definition & Example.

Komentáře • 37

  • @ahmedtamer4620
    @ahmedtamer4620 Před 4 lety +26

    I am not exaggerating but I have seen alot of videos including very professional one like on coursera (University of San diego) but this is the best explanation I have ever had.

    • @ahmedtamer4620
      @ahmedtamer4620 Před rokem +2

      Now I am a TA at my university and I came here to revise

    • @anchalpandey9074
      @anchalpandey9074 Před rokem

      couldn't agreee more. don't know why his channel is so underrated I've been studying this for almost an year yet this is the best explanation I've found so far

  • @mariakhan5045
    @mariakhan5045 Před 3 lety +5

    Of all the lectures, I've understood it by your teaching method. Good job sir!

  • @invincibledrank460
    @invincibledrank460 Před rokem

    amazing how relevant this video is

  • @emoney752
    @emoney752 Před rokem

    finally somebody who explains what Big O notation is before jumping to exercise. Thank you

  • @superpekka772
    @superpekka772 Před rokem

    beautiful sir this was a huge video in terms of knowledge about big o notation i learned this in just one video and tommorow is my exam 2nd semester software engineering

  • @cassianperera2426
    @cassianperera2426 Před rokem

    Dear Sir, your explanation is very clear. Thank you

  • @georgeytg
    @georgeytg Před 2 lety

    I'm surprised this channel doesn't have more viewers. Thank you, you explained this very well!

  • @jamshedkarimnazarov7610

    Holy smokes. Now I finally get it. Amazing video, with great visuals. I didn't even understand from Udacity videos

  • @taylormade7700
    @taylormade7700 Před 2 lety

    Best explanation I have seen! Thank you!

  • @nickm.4274
    @nickm.4274 Před 2 lety

    Very helpful! My cs class did not explain very clearly and this made a lot of sense! Thank you for making this video

  • @weiminchoo4607
    @weiminchoo4607 Před 2 lety +1

    Thanks sir!better than my 2hours university lecture

  • @thodupunoorilavanya1693
    @thodupunoorilavanya1693 Před 4 lety +2

    sir this is very helpful video , and your explanation is very nice .

  • @benedictding
    @benedictding Před rokem

    Such a great video, about to save me on my exam. Thank you sir!

  • @arkoprabhodas774
    @arkoprabhodas774 Před 3 lety +1

    The explanation is very good sir. Thank you

  • @t.manivel7397
    @t.manivel7397 Před rokem

    Nice explanation sir...

  • @sammsiska
    @sammsiska Před rokem

    Well explained🎉🎉

  • @NeerajKumar-gj2mq
    @NeerajKumar-gj2mq Před 3 lety

    Very very nice explanation sir

  • @satyaprakashsoren5986
    @satyaprakashsoren5986 Před 5 lety

    very nicely taught

  • @heismarvellous
    @heismarvellous Před rokem

    Thank you so much

  • @ayshrao8072
    @ayshrao8072 Před 3 lety

    way of explain is very good

  • @mOjEbbb
    @mOjEbbb Před rokem

    THX DOCTOR

  • @akashprajapati5096
    @akashprajapati5096 Před 2 lety

    prety good nd helpfull thxx

  • @beerajsaikia
    @beerajsaikia Před 10 měsíci

    sir ji you are god

  • @dhimal
    @dhimal Před 5 lety +2

    Pretty useful video you have over here.
    Are you teaching a class? What textbooks do you use?
    Also, if you could do more examples on Big Oh, Big Omega, and Theta, that would be great!

    • @SunilDhimal
      @SunilDhimal  Před 5 lety

      Thank you! I am following Introduction to Algorithms, Cormen et. al
      More videos on Asymptotic notations here:
      Why study Asymptotic: czcams.com/video/j8-okOgWv6U/video.html
      Omega notation: czcams.com/video/Ut-TsexLA6s/video.html
      Theta notation : czcams.com/video/vOyqP0jXK5c/video.html
      Examples: czcams.com/video/HR-WGiwlino/video.html

  • @dilayfundauysal9378
    @dilayfundauysal9378 Před 2 lety

    Hi sir, could you help, log(2)(n^(2)+1)=O(n)?

  • @nico4597
    @nico4597 Před 3 lety +1

    god explanation

  • @MotivationMatrix_Ravin

    hello bro i think
    3n+2=O(n^2) have ans : c=4 and n=1;
    To prove that 3n+2=O(n^2), we need to show that there exists a positive constant c and a non-negative integer n0 such that for all n ≥ n0, the following inequality holds:
    |3n + 2| ≤ c * n^2
    We can start by simplifying the left side of the inequality:
    |3n + 2| = 3n + 2, since 3n + 2 is non-negative for all n.
    Next, we can choose c = 4 and n0 = 1. Then, for all n ≥ 1, we have:
    3n + 2 ≤ 4n^2
    Dividing both sides by n^2, we get:
    3/n + 2/n^2 ≤ 4
    Since the left side of the inequality is decreasing as n increases, we only need to verify the inequality for n = 1:
    3/1 + 2/1^2 = 5 ≤ 4
    This is a contradiction, so the inequality cannot hold for any value of n.
    Therefore, we can conclude that 3n+2 is not O(n^2), and the original statement is false.

  • @himanshubarnwal7811
    @himanshubarnwal7811 Před 3 lety +1

    Now understood.....

  • @tamannafaariha3884
    @tamannafaariha3884 Před 2 lety

    Ma sha Allah

  • @amerikantypo8775
    @amerikantypo8775 Před rokem

    Doesn't g(n) become 5n and not 4n? Someone please explain

  • @NASAVisualsHub
    @NASAVisualsHub Před rokem

    Nice explanation .... but i have one doubt which is that Big Oh always represent the worst case complexity and this means that the complexity of that algorithm can't be more than that. It can be less But here you are saying that the upper bound can be 0(n2) and 0(n3). i can't be able to understand that
    can anyone explain this to me ?

    • @SunilDhimal
      @SunilDhimal  Před rokem

      We always go for the tightest or the closest upper bound. If f(n) = n^2, we can prove that f(n) = O(n^2) and f(n) = O(n^3). So both n^2 and n^3 are upper bound but we go for the tightest upper bound {bound that is closer to f(n)}. In this case n^2 is the tightest upper bound to f(n).

  • @shinjuan5106
    @shinjuan5106 Před 3 lety +1

    graph is wrong ,3n+2 running time should be 2 at n=0

    • @SunilDhimal
      @SunilDhimal  Před 2 lety

      Yes! It is just a representation and not an exact graph