Learn Big O Notation In 12 Minutes

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

КОМЕНТАРІ • 217

  • @chovbee
    @chovbee 2 роки тому +73

    I literally spend hours, looking through various videos to try and learn on new things and I never learn as much as I do from your videos man. I really don't know what is is, but the way you explain and teach, there is a simplicity to it that just makes everything click for me. Your channel has helped me so much throughout college and now its helping me prep for my first big interview, I really can't thank you enough man!

  • @threeone6012
    @threeone6012 4 роки тому +121

    This is the best programming channel on UA-cam.

    • @krishuang793
      @krishuang793 4 роки тому +2

      I agree. Simple & straightforward.

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

      facts, my go-to every time

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

    This is the best and simplest video I ever found about Bio O Notation. Thank you man

  • @64imma
    @64imma Рік тому +3

    I've been looking for an explanation for this for like an hour now, and this video has by far been the easiest to follow along with and understand. Thank you very much.

  • @SahilKhan-yt7ql
    @SahilKhan-yt7ql 6 днів тому

    Thank you so much my guy, you've simplified Big O notation so much for me and I can't even begin to express how grateful i am that you make these videos. Cheers!

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

    Thanks kyle. Big(O) notation is something I have always got confused from multiple sources. This video is really helped me to understand with simple examples.

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

    I wached lots of videos , but I didn't get a clear view. but Now I got.. Thank you man.. ! respect..

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

    When I searched about time and space complexity, I saw some very popular channels videos and yours as well in that list. I clicked yours first cuz I trust your knowledge and your way of explaining things is way easier to grasp. Thanks a ton man!

  • @BigSmoke-r9w
    @BigSmoke-r9w 4 місяці тому

    Thank you! Web dev simplified has been my teacher since html and CSS! I'm now studying intermediate javascript and CS50 and he's still the guy that is helping me undwrstand everything ❤

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

    man...my mouth literally dropped when you explained the part I NEVER understood about this in a way I finally can understand...

  • @fredianriko5648
    @fredianriko5648 3 роки тому +28

    what about O(log n) how would you explain it? and what the example of the algorithm that represent O (log n) ?

    • @_da_coconut8235
      @_da_coconut8235 24 дні тому

      One Example is the Binary Search Algorithm. It only works if the Array you are searching for a Value in is already sorted. Lets say the Value you are looking for is A.
      The first step is to take the Middle Value of the Array. If the Middle Value is equal to A then youve gotten very lucky and the Algorithm is finished but realistically that wont happen. If the Middle Value isnt the equal to A, you ckeck if A is larger or smaller than the Middle Value. If A is smaller, you "remove" the right part of the Array, if its bigger, you remove the left part. After that you take the new Array, and once again halve it and compare the middle Value and A, and so on and so on, until youve found your Value.
      The reason this is logarithmic, is because the number of operations isnt linear to the Array length. if you have 8 Values in the Array you will worst case scenario have to split it 3 times, but if you have 16 Values, you will only need to split it 4 times not 6 times, and if you have 32 Values you will only have to split it 5 times not 12 times.

  • @itsReshad
    @itsReshad 2 роки тому +2

    This is the best explanation I have ever come across for learning Big O Notation! Keep the great content coming!

  • @kvnptl4400
    @kvnptl4400 3 роки тому +3

    Thanks a lot for the demonstration of Big-O with coding examples. Now, it is super clear to me.

  • @ivo_sa
    @ivo_sa 8 місяців тому

    best channel for programming !

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

    This is how you explain concepts like these. Highly appreciate your effort.

  • @RoshanKrSoni
    @RoshanKrSoni 4 роки тому +27

    That's why I clicked bell icon.
    Coz only you know what we need.
    Thanks Kyle for making this 😍
    You are Superman.

    • @chris94kennedy
      @chris94kennedy 4 роки тому +2

      I legit don't use the bell icon for anyone because fuck getting youtube notifications. Except this channel.

    • @RoshanKrSoni
      @RoshanKrSoni 4 роки тому

      @@chris94kennedy i know & never click anyone's bell icon. But this guy deserve it. His contents made me to do this.

  • @wepranaga
    @wepranaga 4 роки тому +7

    Now that I think about it, as someone who does have a job, and have interviewed people before
    these kinds of question are not meant to be passed. at all, they're just a good excuse to have the liberty to pick which people you might like
    although there's gonna be exception to those who pass. that's a a different story.
    sure there's interviews that are sometimes have good intention, that's different too.
    not all companies are the same though, for some companies. these kind of question can be more of a necessity rather than a luxury
    but as more and more companies conducting these kinds of interview questions. they're become more of an excuse.
    not to mention if the person asking the questions even knows what they're talking about in terms of these nuance points, not just comparing them to textbook answers
    sometimes if not a lot the interviewee are as clueless when it comes to these questions and just treating them as basic checkmark.
    awesome videos btw, I always enjoy your content.

    • @felixgraphx
      @felixgraphx 4 роки тому +2

      Indeed , in web-dev, where things change every 2-3 years, you dont need any of that computer science maths to execute the demands of your boss/client for his web page or app. In fact, technical question in interviews are meant to see how you would handle talking about technical stuff in group settings were they to hire you : Are you a snob intellectual who likes to flash his technical knowledge in an unpleasant way to other coworkers who are not that nerdy? Hiring people is about good chemistry and personalities! Interviewers are looking for people who will fit with the team's member personalities without big ego clashes!! Conclusion: Dont try too hard to impress you're not impressing anyone just be yourself and be honest about how you'd go about tacking a problem while being positive and joyfull: Boom ! You got the job!

    • @MikeCOYS
      @MikeCOYS 4 роки тому

      That's not entirely true. It depends on the position of the job. If I'm hiring for a senior developer or an architect, I expect them to know these questions as it's important they can create solutions that are performant and efficient, whether they implement it or not.

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

    Just taught me in 12 minutes what I’ve been stressing over for 2 days. Fair enough.

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

    this is so well done !

  • @rohitkudalkar92
    @rohitkudalkar92 4 роки тому +55

    I was waiting for all your data structure and algorithms videos and here start one. Love and support and care ❤️

    • @WebDevSimplified
      @WebDevSimplified  4 роки тому +22

      I have another data structure video releasing soon as well.

    • @RoshanKrSoni
      @RoshanKrSoni 4 роки тому +3

      @@WebDevSimplified will be waiting Kyle

    • @ProgrammingWithProject
      @ProgrammingWithProject 4 роки тому +4

      @@WebDevSimplified please make a series of Data Structure and how to use in a project

    • @sandeepreddy6247
      @sandeepreddy6247 4 роки тому

      Which language is best for learning, data structures and algorithms.
      I'm very good at javascript. & very familiar with java & c.
      Please somebody HELP ME. as I have to continue with js or java or c.

    • @ProgrammingWithProject
      @ProgrammingWithProject 4 роки тому +1

      @@sandeepreddy6247 if you make project in javascript and apply data structure on it then start with it

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

    I'm a graduate student in statistics self learning data structures and algorithms. This is a great example. I'll note that it's also very intuitive from calculus. For any self learners without a STEM background I feel a business calculus textbook (without trigonometry) might be helpful to quickly understand limits

  • @akn9699
    @akn9699 4 роки тому +3

    That's our vintage Kyle doing what he does best, Awesome Videos of JavaScript & other cool stuffs like this !

  • @DawanWright-f6e
    @DawanWright-f6e 11 місяців тому

    One mistake I realized in the video is @9:53... You said the code written is constant. But it is actually linear. Although the outputs are constant, the code still has to run through the for loop. Which gives the code a Linear time complexity. Other than that you did a great job explaining this lesson. Thanks!

  • @jozefwaldhauser
    @jozefwaldhauser 21 день тому

    good video, easier to understand than watching an hour lecture where they talk about all the different things AROUND the actual topic

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

    This was probably the simplest explanation of this topic.
    Thank you!!!

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

    Awesome explanation! Thanks, man

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

    Perfectly explained!!!!!!!!!!!!

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

    Thanks for such a great explanation!

  • @AnkitMishra-sk8nv
    @AnkitMishra-sk8nv Рік тому

    Brother You are a LEGEND

  • @bertk3923
    @bertk3923 4 роки тому +2

    Kyle you’re a legend

  • @mattoattacko
    @mattoattacko 4 роки тому

    You are my frickin hero mate. JavaScript DS&A is like the bane of my existence. pls halp.

  • @real-webbe
    @real-webbe 2 роки тому

    I laughed when you introduced this video by saying "...so you can walk into your next interview...". This does come up in interviews, but it is obviously important to understand time & space complexity of anything you run in a browser. Kyle did a good job of explaining that later on in this video, but I did chuckle when the video started. :)

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

    i took 100 days but i did not understood how to learn big O but now i have learn it beacuse i found your vedio thanks

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

    you explained so well. thank you

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

    Thanks for the video, made Big O notation very simple and clear.

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

    Very well explained for basic usage.

  • @madhusudanr8800
    @madhusudanr8800 4 роки тому +1

    I liked it! The big O notation for recursion should have been added though.

  • @sanghvian
    @sanghvian 4 роки тому

    [Wake up , See what Brad, Kyle and Ed are upto , Learn , Code , Repeat ] ; for (i=0; i

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

    Thank you very good video, it is included as supplementary resource in my software engineering course.

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

    private school quality explanation.

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

    Correction n^2 grows quadratically, which is polynomial, not exponential.
    In short big O notation is the most significant component of the algorithm complexity function, which represents the amount of computation required(worst case usually) for a given input size. I.e. it's the shortest way to express algorithm complexity, without writing the entire function of it, which makes it easier to compare.
    Comparing algorithms becomes as easy as:
    O(n^n) > O(a^n) > O(n!) > O(n^a) > O(n*log(n)) > O(n) > O(log(n)) > O(a)
    Space complexity is usually not a concern, simply because it's pretty much unusable for anything > O(n^2) for any meaningful input size. I.e. you can't really use such algorithms unless they are in the very efficient side of the scale. But yes you can use such notation to illustrate any type of complexity. Time, space, calls(i.e. non local time) and so on.
    To be fair it's not much better for the usability of time complexity algorithms. While you can do slightly higher power polynomial time complexity algorithms it's still polynomial ones or faster that you can run with any meaningful input sizes.
    I really think you missed the opportunity in this video to illustrate how fast the amount of computation requirements grow with complexity even for small n=50.
    n=3 is silly really for algorithmic examples and won't impress anybody even with a O(n^n) algorithm it's 3^3=27

  • @FalseDev
    @FalseDev 4 роки тому +2

    This is AWESOME, would love to see more of these , thanks a lot for this video

  • @rickyzheng572
    @rickyzheng572 4 роки тому +2

    You should do some advanced algorithm videos or introduce scaling concepts by using docker

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

    your video's help me lot usually I never preferred to watch video's for learning but when I started watching your video its really easy and understandable for me. Your content is very simple and short and understandable
    Thanks for making this

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

    Wow, you have explained it so simply. Subscribed to your channel after watching this video

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

    Thank You, my Friend. You saved me.

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

    Oh man, thank you very much! I was trying to learn alone, but some books about algorithms and data structure think that you have Big O notation previously, and many explanations that I found were so complex.

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

    Great video man, really helpful

  • @tacowilco7515
    @tacowilco7515 4 роки тому

    Great job, Kyle. Awesome video.

  • @lbobrov
    @lbobrov 4 роки тому +17

    This big O made me headache in the DS & intrO tO algOrithms cOurse

    • @SquaredbyX
      @SquaredbyX 4 роки тому

      ... that's capital O notation...

  • @sethmccullough6206
    @sethmccullough6206 4 роки тому

    Flawless explanation, thanks Kyle!

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

    Great video mate, but there is something I’m still a bit confused. Bear with me a sec.
    This is the code:
    For(int I=0; I

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

    You are a lifesaver

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt 3 роки тому

    awesome explanation

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

    awesome explanation! really appreciate the simplicity of it.

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

    great explanation

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

    I have see some of the time ( log ) in big O but didn't find on your video, but your explanation was great hope you also explain ( log ) in future.

  • @veluh
    @veluh 4 роки тому

    Great course ... took my ds and algorithms course about 2 years ago now great refresher!

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

    You make it so simple. Wonderful!!. I thought Big O has some mathematical formula involved in it. Like the big one.

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

    Shalom again.
    Very nice!

  • @Meridian-lk2fo
    @Meridian-lk2fo 3 роки тому

    Great explanation, thank you.

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

    You are the best!

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

    that was really helpful and handy, thanks a lot for making such video, it was easy enough and understood it one shot

  • @themynamesb
    @themynamesb 4 роки тому

    Great video.. Good work.

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

    Thank you for this! Very big help :)

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

    Great video.

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

    i like the way you teach... thanks my friend!

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

    Thanks Kyle, very nicely explained, always had problems understanding the O notation

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

    Well done, sir.

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

    Thank you so much. This is really easy to understand. But how about the log ones

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

    great job! thank u👍

  • @xboxtest4226
    @xboxtest4226 4 роки тому +6

    I wished you would have been making Videos when i was in College - you are able to explain things that Took me hours to understand so well, quick and precise, It would have saved me so much time!
    Nevertheless, I Like watching your Videos even If i think that i know Whats going in just to make sure i keep in touch with different topics and basics :)

  • @manny8156
    @manny8156 4 роки тому

    You truly are amazing!!

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

    really helpful thank you

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

    wonderful , thank you

  • @PANKAJ-cr3cb
    @PANKAJ-cr3cb 4 роки тому +1

    Please make more JavaScript algorithm I'm following you , your videos are so easy to understand,😍

  • @kushalupreti509
    @kushalupreti509 4 роки тому

    You're awesome mate.

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

    11:06 jata lol :) (really good teaching btw)

  • @ChrisTian-ox5nr
    @ChrisTian-ox5nr 11 місяців тому

    Thanks this is good!!

  • @rafatulalam8677
    @rafatulalam8677 4 роки тому +2

    Not convinced with this crash course
    Didnt explain the other types of time complexity like O(nlogn), O(logn), O(2^n). Not to mention space complexity is another important concept that should have been touched. Knowing only time complexity alone wont give a guaranteed success as a developer since memory consumption analysis matters as well.

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

    you are so good in explaining ...Can you make full playlist on course (data structure and algorithm) with code , because I think its more important to a computer science student (2)

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

    Hey man, just to let you know that I love what you are doing. You are great teacher. Cheers 🥂

  • @singamsettyrupeshkumar8746
    @singamsettyrupeshkumar8746 4 роки тому

    Ur just rocking ...dude...learnt alot from ur videos !...just need some videos on...spring frame work 😃

  • @cassiodev
    @cassiodev 4 роки тому

    Hello Kyle, this video very good. I'm from Brazil and I like your videos very much man. Thanks for videos 😁

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

    Excellent

  • @andrewjenson_original
    @andrewjenson_original 8 місяців тому

    Question: For your answer O(n+a) at 5:52, can this be re-written to O(2n), which after removing the coefficient becomes simply O(n)?

  • @Virgus66
    @Virgus66 4 роки тому +2

    Correct me if I'm wrong, but console log something n times still gives you time complexity of O(n) as you perform some action n times. It makes no difference if that is console log something or creating new object. O(1) gives you result in the same amount of time regardless of the size of your input

    • @xpfe5zrm
      @xpfe5zrm 4 роки тому +1

      Sounds good to me. You can think of a single console.log operation itself (ignoring the for loop) as an O(1) operation.

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

    Thanks!

  • @doco6186
    @doco6186 4 роки тому

    Insightful

  • @gray_hat
    @gray_hat 4 роки тому

    Thanks a lot man.

  • @rohitsharma8176
    @rohitsharma8176 4 роки тому

    You are awesome buddy💯💯💯

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

    Amazing!

  • @XX-vu5jo
    @XX-vu5jo 11 місяців тому

    Woah, I did not know Jordi was into computer science?!!

  • @misamee
    @misamee 4 роки тому +1

    What would be the size of the Lester lopp example if you were using recursions instead?
    Would it be the same?

  • @Kk-xk5cb
    @Kk-xk5cb 3 роки тому

    only you can save my life Kyle, I own you

  • @gouranshsachdeva6097
    @gouranshsachdeva6097 4 роки тому

    Thanks for this simple and effective explanation, I always stucked at these, But now i think its sorted😄

  • @briandacallos4234
    @briandacallos4234 4 роки тому

    I came from cs dojo and while watching his video I saw a video of kyle on the right side of my desktop so without any hesitation I jumped into it.

  • @EnXsz
    @EnXsz 4 роки тому +1

    lmao I have an interview tomorrow, thank you!

  • @Laranthir
    @Laranthir 5 місяців тому +1

    This video is old but I didn't understand why it is O(1) instead of O(n) at 9:40? Is it because data[i] is already allocated in memory but data[i] + data[j] is a new variable that uses a new space?

    • @Super_Shaq
      @Super_Shaq 3 місяці тому +1

      In case you still have this question, it’s because no new variable was created. So the data is logged but not stored, hence taking no additional space

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

    Perfect!