Big O Notation - Full Course

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

КОМЕНТАРІ • 483

  • @ad0n1s-273
    @ad0n1s-273 3 роки тому +246

    Wow! Been learning your beginner programming course but stopped because I can't follow on the big o notation part and been searching to learn more about it. You posted about it when I exactly needed it, thank you so much ! You guys are such a lifesaver!

  • @StarRoseAngelic
    @StarRoseAngelic 3 роки тому +724

    Christ pls give me the attention span to get through this course. Amen

    • @julianosanm
      @julianosanm 3 роки тому +33

      The hand drawing behind the screen doesn't help with that! Please stop using that it's distracting af!

    • @ahmed_raaphat
      @ahmed_raaphat 3 роки тому +30

      Divide and conquer

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

      I refuse to like this comment because it has 69 likes. I pray everyone does the same🙂

    • @melvinsaji2805
      @melvinsaji2805 3 роки тому +9

      AMEN 🙏❤️🙏

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

      meeeeee tooooooooooooooooooooo

  • @idilsuozer8800
    @idilsuozer8800 Рік тому +12

    the sound at 1:20:12 it got me cracking up lol.
    an amazing straightforward tutorial, thanks a lot!

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

    This is what I'm currently learning in college and needed someone to break it down for me. Thanks 👍

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

    Throughout the Covid-19 pandemic businesses and Government faced the need to solve multiple,competing priorities simultaneously. One of the toughest: how to keep an economy going while at the same time shutting it down to protect citizens from infection. As some regions emerge from the worst of the health Crisis, it’s tempting to think that there could be a return to focusing on just one main concern. But this week, Expert Christiana examined sectors,particularly defense and national infrastructure,where solving for dual imperatives is more important than ever.
    Defense forces,which typically..
    Greetings everyone

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

      Since Cryptocoins can be traded both inside and outside the digital currency environment,digital currencies are more than jst a way to pay for goods and services-they’re also a viable investment opportunity. in fact,Cryptocurrency has several advantages over fiat funds when it comes to investment opportunities,one of the biggest is that it isn’t subject to the same market conditions that traditional currncies are when it comes to foreign exchange rates.
      The best example of this is the state of the pound after the UK voted to leave the European Union. in the wake of the Brexit vote,the value of GBP began to plummet as investors responded to the realities of the UK leaving the EU and the financial instability this new situation created.However,the world of digital currency is insulated from such real world issues thanks to its very nature -its not tied to any single bank or government. in some cases,Cryptocoin value actually increased as investors realized that digital currencies like Bitcoin were unaffected by Brexit.Another important advantage of cryptocurrency is its potential for explosive growth.Bitcoin,for example,has demonstrated overall positive growth since its inception-as of August 1st,2017,Bitcoin was trading at more than $2500 per coin,whereas a year ago it was trading at around $600 per coin.Industry experts have long predicted that Bitcoin can and will increase its value even higher in the future,providing excellent potential for long-term growth.
      This is the reason why I choose the service of Expert Christiana to perfect my Tradinq Skillz,She handles my Tradinqs and that of my co-workers and profit is Guaranteed.She can be reached in Tel’egram@Christianarobert ,,What’s-a’pp ((+1(201)365-3489))))!!!!!!!

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

      🤔 You trade with Christiana? , I'm currently on my 5th trade with her and my Ptfolio has grown big..

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

      I'm from Aberdeen 🇬🇧, I and my Mate gave her a try and it's has been good returns of our investment. She good

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

      We've seen these dip many times in the last 10 years, cannot believe people still get scared with these healthy dips, Buy the discounts! Christiana has always been good at analysing this

    • @LuizGustavo-ft3ye
      @LuizGustavo-ft3ye 3 роки тому

      Insightful content, Well personally I feel, those who would allow the market dynamism determine when to trade or not are either new in crypto currency world in general or probably just naive, crypto currencies have seen far worse times than this, enlightened traders continue to make good use of the dip and pump even acquiring more equities towards trading sessions,
      months back I started trading, though i knew just the basics of trading, i wasnt able to capture the secret to understanding the use of signals till I got connected to trading Expert Christiana Robert . Under her guide I've been able to understand the market structure and how best to use signals for amazing returns, plus her trading classes has been so educative,

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

    That is the best explanation about Big O notation I have ever seen 🤯

  • @faye7503
    @faye7503 22 дні тому

    i have been struggling so much on understanding this topic, and this video discussed it at the perfect pace! thank you!

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

    At 1:05:40, you don't need to specify the last element of an array in the slice function. Leaving the second argument blank will do the trick, as specifying only one argument in slice goes to the end of an array by default.

  • @praffulpatil007
    @praffulpatil007 3 роки тому +9

    This is pure gold 🤩 thanks for making such amazing content. Initial i did not expect to stay till end of the video but boy oo boy the content quality is so good that it kept me hooked.
    Love you guys 🤩

  • @chachacha1289
    @chachacha1289 3 роки тому +6

    I have seen a lot of different stuff but this one is the best! 2 hours well invested. Bravo and thank you for these crystal clear explanations!

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

    THANK YOU.
    been wanting a video on this for a while

  • @Ty-tf1ch
    @Ty-tf1ch 2 роки тому +2

    Had to rewind at 1:20:15 to make sure it wasn't my stomach grumbling lol.. Great video super informative!!

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

    Best course for big O notation ever

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

    Great explanation! So far this has been the easiest out of my 3 days of journey in just understanding the meaning of big o notation

  • @bassam.2023
    @bassam.2023 Рік тому

    This is the best video on time complexity on UA-cam, period. 😀
    Thanks!

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

    I would rate this course about 7/10. It covers all needed information to calculate time complexity, but I'd like to hear some mathematics: where does it come from? I've been looking for a nice mathematical explanation for a long time, but I haven't found any online. It has something with asymptotes, and I also saw big-O in Wolfram Mathematics. So, technically, this is not a big-O full course, it's "how to calculate time complexity" course.
    P.S. I had noticed that a lot of people just skip the mathematical underground while learning programming. I'm really concerned about this, because it would significantly decrease the knowledge of programmers, and as a result, people would have a bad and buggy software. So please, learn some maths too.
    P.S.S. Can someone drop a link for a big-O notation course with more mathematical explanation. Thanks in advance.

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

      I'd take a link to a good mathematical/more theoretical explanation too.

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

      Hey thanks for the feedback! Actually, technically asymptotic notation is a family of notations of which Big O is a member. This course is focused specifically on its use in computer science. That is, its use in classifying algorithms according to how their run time or space requirements grow as the input size grows. Yes Big O is also used in number theory but that does not mean that one needs to study number theory to learn concepts in computer science. Number theory is a branch of pure mathematics which is in no way a prerequisite for learning Big O in the context of computer science. This course focuses on Big O's use in computer science which is actually not that mathematically deep.

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

      @@kantancoding Thank you for your reply. I do understand that there are a lot of unnecessary material in mathematics for computer science. But still, if we use big-O to show time complexity, there must be a reason for doing so. Learning everything about number theory or big-O isn't necessary, but I think, that understanding this reason of usage is crucial to understanding of the topic.

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

      @@AndoroidP Of course, it's no problem! I agree that understanding the reason for its usage is crucial. I didn't do a very good job of explaining its practical usage in the real world. Thank you very much, your feedback is very helpful 🙏

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

      You might want to check out Mathematics for Computer Science by MIT.

  • @KrishanuDebnath-vv9cs
    @KrishanuDebnath-vv9cs 9 місяців тому

    You make it so easy, best channel in UA-cam man

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

    🐐🐐🐐Amazing video, don’t hesitate to make more

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

    This is the best video i have found so far for understanding big O notations! Thank you.

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

    In general a very good explanation of the topic, yet for anyone who is somewhat familiar with the basic idea of the topic or the scaling of different mathematical functions the expalations are generally very slow. I think some parts, like n^3 could have been same quality in alot less time.

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

    I only know python and still understanding his code 100%.
    Thats what good teacher matters

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

    I love how you detailed the deep dive part of merge array. I'm a python beginner and I'm not good at recursive prgoraming, this video helps me alot, thank you❤

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

    Awesome tutorial !!!

  • @Karim-nq1be
    @Karim-nq1be 11 місяців тому

    Thank you for this video. I wouldn't way that it doesn't matter how big the numbers are when multiplying two numbers. Though it is correct to say that multiplying two "small" numbers would take constant time since the CPU can compute the result almost instantly, multiplying two very large numbers takes polynomial time.

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

    wow! i'm so blessed, thanks for the course i now understand what Big O notation is!

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

    Thank you and watched the full video.

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

    1:20:13 actually thought that was my stomach while in the library and looked to see if I had disturbed people! great video, awesome you should lecture at my Uni way more students would get you than the lecturer!👍

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

      Thought it was my stomach too 😂

  • @YashDesai-hi8iu
    @YashDesai-hi8iu Рік тому

    at [1:15:00] we could return this in python -- > ""return result + [left_arr[lx]] if lx < rx else result + [right_arr[rx]]"

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

    Very good and clear explanation, sorted many of the questions I had in mind. Thanks.

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

    Must say that thats the best tutorial related to the subject!!!

  • @KarthickRajan-y2x
    @KarthickRajan-y2x 10 місяців тому

    Thanks for the in depth explanation

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

    What a tactile video lol, the keystrokes added a strange ASMR element to the learning experience :p Didn't know I was into it until now!

  • @MrDummy-sn5rb
    @MrDummy-sn5rb 2 роки тому

    Insanely simple and precise

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

    Fantastic course, with amazing examples. Simple objective, now I can study better algorithms. Thank you very much!

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

    This is a great video. I'll say for those who don't have at least an engineering math background that studying some matrix algebra and calculus without the trigonometry (however trig is fun!), might be helpful for intuition. Also it can open doors otherwise left closed for programming jobs.

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

    Thanks for this good course.

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

    Thank you for a great explanation!
    1:20:13 Looks like someone was hungry back there :P

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

    Thank you so much for this video! I finally have a good base understanding of how to calculate Big O~ Your explanations were wonderful. I have a question - what tool do you use to write with on the screen and also have the code snippet on the screen?

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

    the thumbnail was sick !!!!

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

    Thank you. This helped me a lot.

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

    This guy really did a great job... Thanks so much for this

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

    Wow! Amazing explanation.

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

    This is great. I'm going to talk about it more in my videos.

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

    I would probably go crazy repeating myself so many times in different ways 🤪 But I appreciate that it DOES help make it stick 🙂

  • @MohamedOsama-gk9vg
    @MohamedOsama-gk9vg 3 роки тому

    Yes thank you i've been waiting for this

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

    Thank you so much for this video! Desperately needed it!

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

    I like your explanation, sir. Very clear and precise

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

    Thank you your video helped me so much!

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

    this video is very helpful! thank you!

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

    wow! amazing work/ on point ..thank you

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

    The description is wrong. Big O notation does NOT tell you how long an algorithm will take to run, rather it tells you how the speed "scales" relative to a change in the size of input. For example, for a n^2 bubblesort algorithm, if the observed time on input size x is 1 second of runtime, then if the input size in changed to 2x, it is likely the runtime will increase to 4 seconds (not to 2 seconds). That is assuming it doesn't change from worst case to best case with the 2 different size inputs. Let's say random numbers for both to be fair.

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

    My girlfriend had many "big O"s so I notated them in my notebook so I remember what she likes. I would classify her as O(69). I use an insertion algorithm on her but she thinks of me more as a quickie sort. A ha ha.

  • @BederikStorm
    @BederikStorm 9 місяців тому +1

    I don't like 2^n estimation for Fibonacci numbers. It must be more precise: O(((1+✓5)/2)^n)

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

    1:27:14 All this "MergeSort" algorithm analysis is not taking in consideration the time complexity of the in-built functions (for example, Array.prototype.slice() is being used to slice the array in two based on the middle index, and this happens log n times)
    As far as I've researched (and yes it's kinda obvious), the time complexity of those methods are not constant (well, kinda depending on the used parameters; I would say, as the slice() is used in the merge function to get the none merged values, the in-built method may be done to avoid a loop if detecting the index passed as parameter is the same as the last array's index in the case there is just one element rest to merge). Still & anyways, should I consider those functions when calculating algorithm's complexity?
    cheers from Argentina ❤

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

    Thanks for the wonderful explanation!

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

    Excellent explanations

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

    thanks for this course, i'm appreciate it ..

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

    I love this explanation, thank you so much ❤

  • @Mari_Selalu_Berbuat_Kebaikan

    Let's always do good 🙏

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

    Thanks for this great content.

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

    best explainer!!

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

    Nice vid bro thanks for the lesson

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

    What is now the difference between recursive & iterative and what is their application in Python? Or real world applications generally?

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

    About O(a+b)
    Isn't if possible that for example a>b
    So a=k*b (k>1)
    So a+b = k*b+b
    =(1+k) *b
    So O(a+b) =O((1+k)*b)
    =O(b)
    Because 1+b is constante

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

    Thank you for this info! I really appreciate the help

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

    Thanks for such awesome lectures. Please upload some more lectures on Time and space complexity

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

    great video , love from india

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

    Hats off to you bro. Wonderful job 👏.

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

    Excellent course! Thank you.

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

    Great Tutorial Thank You Sir

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

    What would be the big O notation for sleepsort? So mainthread -> thread(item)
    In thread:
    sleep(item)
    list.append(item)

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

    WoW!!! Great Explaination

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

    Very good tutorial

  • @YashDesai-hi8iu
    @YashDesai-hi8iu Рік тому

    great tutorial!!

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

    thank you! it is so much easier now

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

    Thank you forst for the content , thank you to use js in implemantation 💙

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

    Great video. Thanks a lot!

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

    Very clear and informative session :)

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

    given an integer x, which is a power of a prime number i.e. x=p^k for some prime p and integer k. Both p and k are unknown. Assume multiplication and comparisons are unit cost. I need to find both p and k . What would be the most appropriate bound on the time complexity? I thought of using sieve of Eratosthenes but it would take O(x) time, is there something better, Binary Search maybe?

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

    Poor the guy who spent all the night designing the image of this video 😆
    Jokes aside, Great content as always.

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

    Thanks

  • @shamaryedwards.4321
    @shamaryedwards.4321 Рік тому

    Thanks!

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

    Very good!

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

    Honestly, skimming through a bit more:
    * No reason at all to use recursion to illustrate O(log(n)). It's true that recursive algorithms *on trees* often have logarithmic performance, but it's just as easy to make a non-recursive example and it's really not confusing to use iteration for tree algorithms rather than recursion also. The point is: at each step of *iteration* or *recursion* is that you're *multiplying or dividing* instead of *adding*.
    * Why not just jump into merge sort for nlogn and use the separate example in addition?
    * I do like the fib explanation for 2^n. What would have been *really* cool IMO is demonstrate how you can improve it. Easy way: memoize that function to get O(N). Slightly harder way but still possible with algebra: rewrite the fibonnacci definition in terms fib(n/2) instead of fib(n -1). Write an iterative solution that is O(log(n)) for this! This one example could illustrate both how to calculate different big Os, running the different solns on different input sizes can demostrate clearly how helpful this is. You can't type a number big enough to slow your computer down with the log solution. You can usually get an answer from the linear one. The 2^n one will hang forever on any nontrivial number.

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

    thank you

  • @Everything-zk3mk
    @Everything-zk3mk 2 роки тому

    Runtime complexity Search vs Access operation
    Hi so I have been going over Big O but had a question about the access and search operation within Data Structures. I'm aware that search is basically iteration through a Data Structure and access in the context of arrays would be something like array[3] to access specific part of the array, I just wanted to verify am I accurate in my assessment and does the example I have for other Data Structures accurate when it comes to access operation access data structures example:
    // Array Access O(1)
    arr[3]
    // linked list access O(n)
    head.next.next.next.value
    // tree access O(log n)
    root.left.right.left.value
    // graph access not sure about runtime in terms of access
    node.id
    node.edge[2]
    node.edge[2].id
    node.edge

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

    U should've used Python instead of JavaScript. It is easier and any coder from any coding language background could have understood it. But still, Very good video

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

    Very well explained 👍

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

    Thank you! Good video.

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

    What will be the complexity of this..?
    for (int i = 0; i < SIZE - 1; i++)
    {
    if (array[i] > array[i + 1])
    {
    swap(array[i], array[i + 1]);
    i = -1;
    }
    }

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

    Love you all guys🙂

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

    I finsh the video :) Thnks! I learn a lot

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

    Just in time before exams

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

    function logn(n) {
    while(n > 1) {
    n = Math.floor(n / 3);
    }
    }
    this algorithm big O notation is O(log3(n)). Am i right?

  • @АндрейЧерабаев-э1ь

    1:35:00 isn't it easier explains like that: 2^0 (for fib(4) it's first call) + 2^1 + 2^2 + 2^2 thats equals to (2^4) - 1, then we omit constant "-1" that gives us 2^n clearly?
    Just as variant without explaining trough 2^(n-1)

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

    thankyou

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

    Do a video on Tree Questions also.

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

    ty

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

    1:46:00
    1:46:34
    During the explanation, somebody had to call an ambulance because of an unexpected heart attack caused by the factorial complexity.