Learn Big O notation in 6 minutes 📈

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 242

  • @Olegator56
    @Olegator56 6 місяців тому +126

    Those 6 minutes were more useful than 6 months of lectures. Thanks

  • @CallMeAce153
    @CallMeAce153 Рік тому +545

    Good thing our professor needed 5 hours to explain that graph...

    • @achillesbissias
      @achillesbissias 11 місяців тому +48

      College is a scam but unfortunately we gotta do it lmfao

    • @noamrtd-g4f
      @noamrtd-g4f 10 місяців тому +18

      Mine explained it in 5 minutes so no one understood it (lol)
      At least he came to a conclusion at the end

    • @jasonwang-wg8wu
      @jasonwang-wg8wu 10 місяців тому +9

      Cold, crushing grip of academia got you too?

    • @philippemts88
      @philippemts88 10 місяців тому +23

      Well, no one can understand it in a 6 min. video.
      It doesn't even show the formal definition of Big-O neither how to prove its theorems and properties.

    • @ditz3nfitness
      @ditz3nfitness 10 місяців тому

      Here too, lol. I didn't understand a single thing, and nobody else did either @@noamrtd-g4f

  • @berkan5018
    @berkan5018 Рік тому +85

    It's preposterous that you can make everything this simple and smoothly learnable. Thx a lot for real

  • @saurabhbasak9545
    @saurabhbasak9545 3 роки тому +23

    Idk man there's something about your presentation and the colors you use that grabs my attention and now I'm actually understanding these concepts. Thanks Bro!

  • @redaboukdir5678
    @redaboukdir5678 2 роки тому +150

    I made a summary for this lesson in the same way that Bro uses and I would like to share it with you, bros
    public class BigONotation {

    /**
    * Big O Notation (how code slows as data grows):
    * it describes the performance of an algorithm as the amount of data
    * increases.
    *
    * it is machine independent but we are focusing on the "number of steps" to
    * complete an algorithm.
    *
    * examples of Big O notations:
    * O(1)
    * O(n) (n = amount of data)
    * O(log n)
    * O(n^2)
    * ...
    */

    /**
    * concrete example:
    * addUp1() method will add up to a certain number (n).
    *
    * ex:
    * if n = 3 -> sum = 0 + 1 + 2 + 3 -> sum = 6.
    * here, the number of steps is 4 because we have one operation
    * (sum + i) repeated 4 times (n

    • @Evoyde_
      @Evoyde_ 2 роки тому +5

      Thank you bro !!!!

    • @thanosmylonas9781
      @thanosmylonas9781 2 роки тому +3

      Thank you so much Bro

    • @DMPLAYER1000
      @DMPLAYER1000 Рік тому +3

      Thank you bro! I am in love with you for this

    • @ninoe9124
      @ninoe9124 Рік тому +1

      such a goat fr bro

    • @CountDracula-vq8zn
      @CountDracula-vq8zn Рік тому

      Tried it, addUp1 is faster compare to addUp2.
      addUp2 is only fast if there are more numbers/steps whilst
      addUp1 is fast if it is less numbers/steps

  • @omardumet120
    @omardumet120 3 роки тому +23

    Please keep making more videos about this it helps for interviews thanks bro

  • @ditz3nfitness
    @ditz3nfitness 10 місяців тому +6

    Just as I'm getting introduced to this topic on the third semester of my Software Engineering degree in a course called Algorithms & Data Structures, I get recommended this video! Thanks, Bro Code!

  • @flashbao1922
    @flashbao1922 3 роки тому +2

    The guy needs to be seriously appreciated!

  • @mactenssheelal1840
    @mactenssheelal1840 3 роки тому +13

    Man, really thank you!!! I'm just learning for my Data Structures and Algorithms exam next week on my Uni, and Big-O was one of a few things, that I couldn't fully understand. Thanks to you now I understand it clearly

  • @roytescaro6313
    @roytescaro6313 2 місяці тому +1

    Great video Bro, just a quick note. When you said (at minute 5:15) that an algorithm that has O(n**2) can be faster than a O(n) algorithm if n is very small showing the graph, the part in which n**2 < n is only when 0 < n < 1 and since we're talking about data size then n is a positive integer and it is at least n = 1. The only way an O(n**2) algorithm can be faster than an O(n) algorithm is if there are hidden constants that have been omitted (since time complexity is asymptotic), an O(n) algorithm might actually be O(c1*n +c2) where c1 and c2 are constants. And depending on how large are these constants then you can find n > 1 such that c1*n + c2 > n**2 and therefore n > 1 such that the O(n**2) is faster than the O(c1*n +c2) ~ O(n) algorithm.

  • @rishabhverma7064
    @rishabhverma7064 3 роки тому +75

    I just discovered this channel and goes through the python course I must say...... U deserve 🙏🙏🙏🙏🙏

    • @wrathofainz
      @wrathofainz 10 місяців тому

      "Prays" lmao

    • @soulfulsolitude116
      @soulfulsolitude116 5 місяців тому

      Dumbo that emoji is also used to express gratitude. ​@@wrathofainz

  • @thatChillLife2037
    @thatChillLife2037 29 днів тому

    This was a GREAT explanation! I struggle with this as I learned to code in a bootcamp that did not study it and I don't have a CS degree. Thanks so much for the examples, helped a bunch! I will be rewatching :)

  • @youvegotmail9385
    @youvegotmail9385 2 роки тому +13

    I kinda somewhat get Big O notation now on a high level. that graph helped so much. Google in 3 years here I come!

    • @modaprogrammer
      @modaprogrammer 4 місяці тому

      hope u got the position u wanted now!

  • @danser_theplayer01
    @danser_theplayer01 Рік тому +8

    For anyone wondering, O(√n) is between O(n) and O(log n). It also has a cousin O(√(n)/2) which is literally 2 times smaller even in the worst case scenario, it's important to read non simplified O notation when calculating total time (not general complexity) for your specific algorithm.

    • @lelo_7375
      @lelo_7375 Місяць тому

      Isnt O(sqrtn) polynomial time? O(n^x) since its O(n^(1/2))

  • @wenterinfaer7868
    @wenterinfaer7868 2 місяці тому +1

    The things I've always adored about computer science is how I struggle understand a topic until something snaps in my head, and it all becomes child's play.

  • @BPEKSupraInteractive
    @BPEKSupraInteractive 3 роки тому +11

    Wow. Thanks for helping me understand Big O here than the 3 weeks we spent on in class lol

    • @ChrisAthanas
      @ChrisAthanas 10 місяців тому

      Universities are about to go bye-bye

  • @ahmedxficeh7894
    @ahmedxficeh7894 5 місяців тому

    That was the best explanation of the topic i found on the whole internet. Thank you very much

  • @mahendranath2504
    @mahendranath2504 3 роки тому +2

    Thank you so much bro code, I'm watching your channel,it will grow bigger then your expected

  • @lemapperium5344
    @lemapperium5344 Рік тому +1

    The easiness of this man's explanation is incredible

  • @mohammedrangoonwala9328
    @mohammedrangoonwala9328 3 роки тому +2

    That was just an amazing video. Keep up the hardwork and effort you put into your videos.

  • @anaballesteros7282
    @anaballesteros7282 5 місяців тому

    Honestly, the best explanation of Big O, thanks you!

  • @HessaIT-u8f
    @HessaIT-u8f 3 місяці тому

    I'm really grateful for this channel, it save me in a lot of time.

  • @somethingwine
    @somethingwine 7 місяців тому

    Thank you! Great code examples to demonstrate the "steps" it takes. :D

  • @andresroca9736
    @andresroca9736 3 роки тому +5

    Cool Bro! Great to see data structures and algorithms here. Please, more on these. Your channel is getting better and better. Subscribed!. Muchos saludos 🤙

  • @hariprasaanth
    @hariprasaanth 3 роки тому +8

    I jus wanna let u know that I'm highly addicted to your channel (after java beginner playlist)and I badly want u to complete DSA asap before facing placements
    Keep up the good work broman 😂

  • @jackvianey1630
    @jackvianey1630 Рік тому +2

    You are amazing, Bro!!

  • @bruno10505
    @bruno10505 9 місяців тому

    Man, thank you. I watched about 2 hours of my teacher talking about it, and in the end, I didn't even know how to tell the big O of my own algorithm, now, 10 minutes later, I understood it with a 6 min yt video

  • @deepdaddy1208
    @deepdaddy1208 3 роки тому +1

    I have always enjoyed your humour, cheers and great vid

    • @rewardx
      @rewardx 3 роки тому

      what humor?

  • @hrld0
    @hrld0 5 місяців тому

    good to hear you in a non-coding video lesson, bro!

  • @moglimogify
    @moglimogify Рік тому +2

    Very useful. As a bonus I didn't know the sum of n is the same as n*(n+1)/2

  • @yohanmaharanasingha9343
    @yohanmaharanasingha9343 5 місяців тому

    Simple and covered. Thank you
    From Sri Lanka

  • @AnthonyR007
    @AnthonyR007 3 роки тому +1

    Yoooo, My favorite comp sci. channel is back at it again
    Have you looked into rust at all? I’ve just started diving into the documentation, and I gotta say, it’s so much better than anything else I’ve used previously

  • @johnquintana-bo2xy
    @johnquintana-bo2xy 2 місяці тому

    I learned more in 6 minutes , then I did going to class and tutoring for the past couple of weeks

  • @AbhijeetKumar-cm3jh
    @AbhijeetKumar-cm3jh 3 роки тому

    bro is on the way to 100k 🥳
    really looking forward for future vids

  • @walrexx_2370
    @walrexx_2370 Рік тому +1

    this video explain well the topic. Thank you alot for your time for making this tutorial video.

  • @ThapeloMachaka256
    @ThapeloMachaka256 Рік тому +1

    this man is the plug!

  • @estelle9819
    @estelle9819 Рік тому +1

    this is so easy to understand. thanks bro!

  • @hermitmobile1742
    @hermitmobile1742 2 роки тому +1

    This right here is a great man

  • @CoffeeXmusic
    @CoffeeXmusic Рік тому +1

    Super clear and concise. Thanks bro!🎉

  • @PythonDS
    @PythonDS 3 роки тому +2

    Great explanations! Thanks for share.

  • @zohirboshi2245
    @zohirboshi2245 3 роки тому +1

    You are such a great man keep it going 💞🔥

  • @melonolandsorryformybadeng2815
    @melonolandsorryformybadeng2815 3 роки тому +1

    Bro code is different than other tutors xD. awesome

  • @dribrahimel-nahhal2477
    @dribrahimel-nahhal2477 Рік тому

    Excellent amazing video. Thumbs up 👍 .

  • @jeremiahgatwechpeter4222
    @jeremiahgatwechpeter4222 3 роки тому +2

    You always rock it down bro!....huge admiration to yuh !

  • @BbabbittGolf
    @BbabbittGolf 4 місяці тому

    Extremely straightforward

  • @mrsdhuha
    @mrsdhuha 27 днів тому

    This is amazing summary, many thanks!

  • @Fawad-ew7qe
    @Fawad-ew7qe Місяць тому

    Your video was o(1) for my mind ❤ thank you

  • @CSstudent_1001
    @CSstudent_1001 Рік тому +1

    Nice explanation as usually 👍 🌸

  • @leoniaklebanov2502
    @leoniaklebanov2502 3 роки тому +2

    Awesome and simple, thanks a n!

  • @Balanceiskey-nd6el
    @Balanceiskey-nd6el 6 місяців тому

    Thank you! This is a great foundation for me to learn more.

  • @smellthel
    @smellthel 4 місяці тому

    “you get expelled”
    imagine getting expelled over bogosort lmao

  • @shiftshaddow6487
    @shiftshaddow6487 Рік тому

    After like ten videos, this is the best video by far. 0(1) for sure

  • @maroofraktim293
    @maroofraktim293 4 місяці тому

    Great video bro, subbed.

  • @Snowmanver2
    @Snowmanver2 3 роки тому +1

    Amazing, thank you, bro!

  • @JJavierCueto
    @JJavierCueto Рік тому

    Expelled from the school 😂. Excelente video hasta ahorita el mejor explicado

  • @alonasmatko9670
    @alonasmatko9670 10 місяців тому

    Many thanks! This video is really good for beginners!

  • @llamadrama169
    @llamadrama169 20 днів тому

    Great explanation, thanks Bro!

  • @raajroy5931
    @raajroy5931 3 роки тому +2

    bro i was a hater for learning bigO
    notation before watching your video. 😡
    cause i cant understand that much.😬
    you made me understand this bro. 😘
    have you uploaded the "travelling salesman problem" video?🤨

  • @_Curiosity_
    @_Curiosity_ 2 місяці тому

    Useful video! Thanks bro

  • @skolan4834
    @skolan4834 6 місяців тому

    wow very good explaination thank you!

  • @Diamond_Hanz
    @Diamond_Hanz 3 роки тому +1

    Love your videos, brooo

  • @matheusreuter9600
    @matheusreuter9600 4 місяці тому

    Thanks, it blew my mind

  • @kunalsoni7681
    @kunalsoni7681 Рік тому

    such a amazing explaination by the help of graph 🤩

  • @MathsinAmharic
    @MathsinAmharic Місяць тому

    Sir, I am very, very sorry not mentioning you title , you are great teacher,you just target what we learner need thanks a lot 😂❤❤❤❤❤

  • @vishalkumar1313
    @vishalkumar1313 4 місяці тому

    clear explanation 👌👌

  • @Helmansonable
    @Helmansonable 10 місяців тому

    You could add the precise definition of Big O notation, not only the intuition behind it

  • @raiden_jay
    @raiden_jay 3 місяці тому

    So we can also say that the shorter the data, the faster the supposed slow big O notations? Like 0(n^2) is faster than 0(log n). I'm no cs student so I'm bad at math 😞

  • @pablofuentes4450
    @pablofuentes4450 8 днів тому

    so good explanation bro

  • @marquinho1p
    @marquinho1p 6 місяців тому

    fire explanation! thanks!

  • @AllYourMemeAreBelongToUs
    @AllYourMemeAreBelongToUs Місяць тому

    4:32 Quadratic time

  • @ConfidenceGold
    @ConfidenceGold 3 місяці тому

    Bro, Thanks! Appreciate it!

  • @lanceroygames
    @lanceroygames 4 місяці тому

    Great video man!

  • @phinhhung2398
    @phinhhung2398 3 місяці тому

    My professor's explanation that took me 4 months but still didn't get it, until I saw this video.

  • @itsashhuby6781
    @itsashhuby6781 11 місяців тому

    i love this guy i stg

  • @nikitos2442
    @nikitos2442 3 роки тому

    Underrated!

  • @awwtawnoo
    @awwtawnoo 3 роки тому +2

    which programming language are you gonna use for this DSA course?

  • @charitharanasingha
    @charitharanasingha Рік тому

    Nice explanation Bro!!!

  • @snapreal9814
    @snapreal9814 Рік тому

    Asante kwa maelekozo mazuri

  • @vedantdeshmukh4949
    @vedantdeshmukh4949 3 роки тому +1

    Hey Bro!!!! Hope u are doing well. Thanks for such awesome content🔥🔥🔥
    Love❤️

  • @Garrison86
    @Garrison86 2 роки тому

    awesome explanation! Thanks

  • @mootee8575
    @mootee8575 3 місяці тому

    Amazing ❤

  • @ProgamerEU
    @ProgamerEU 3 роки тому

    Awesome overview

  • @MellowJustin
    @MellowJustin 3 роки тому

    Thanks for these videos man

  • @trntrinh79
    @trntrinh79 Рік тому

    Thanks a lot for sharing all of this.

  • @jpao773
    @jpao773 13 днів тому

    school took 3 months to teach this and i had no idea what it meant. got it in 6 minutes from Bro

  • @letsthinkforamoment8904
    @letsthinkforamoment8904 7 місяців тому

    Hold up, how are the two functions at the start the same??? first one adds up n, the second one performs exponentiation and divides it by 2? Two different results.

  • @MultimediaCizzy
    @MultimediaCizzy 3 роки тому

    PLZ MORE DSA. luv u

  • @Extrify_
    @Extrify_ Рік тому

    im learning this thing but i have no idea about anything in CS
    my major doesnt have CS - what should i study before this so i get a basic understanding?

  • @keerthansj845
    @keerthansj845 7 місяців тому

    Awesome bro

  • @mondlistyleman9389
    @mondlistyleman9389 Рік тому

    Like I always say, my python hero

  • @wolanus
    @wolanus 3 роки тому

    Great video!

  • @gerardsk8ordie
    @gerardsk8ordie 10 місяців тому

    thanks for the short explanation

  • @Maros554
    @Maros554 Рік тому +1

    You're the bro

  • @adityarajsrivastava6580
    @adityarajsrivastava6580 3 роки тому

    This was great!

  • @ashyvlogs1132
    @ashyvlogs1132 3 роки тому

    Revision covered, my g

  • @theencryptedpartition4633
    @theencryptedpartition4633 10 місяців тому

    n! getting expelled is crazyyyyy, but I agree lol

  • @iRandroid
    @iRandroid 3 роки тому

    Is this videos by order, should I watch the Playlist from the top?

  • @emreotu4464
    @emreotu4464 Місяць тому

    Learn Big O notation in 6 minutes 📈

  • @martinbabala6719
    @martinbabala6719 10 місяців тому

    1:09 shouldn't it be exponential time?

    • @ryuzoraa
      @ryuzoraa Місяць тому

      exponential is for nested loop

    • @martinbabala6719
      @martinbabala6719 Місяць тому

      @@ryuzoraa but when we increase the amount of data by one byte we get twice the computation time

  • @cjrozor918
    @cjrozor918 3 роки тому

    Thanks my Bro!