1.1 Amortized Analysis | Introduction with Examples | Advanced Data Structures | Algorithms

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024

Комментарии • 60

  • @IamNGD
    @IamNGD 2 года назад +29

    After watching 20+ videos on this topic i found the one i really needed😢 thankyou so much sirji🙏

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  2 года назад +6

      I hope you are not refering to My 20+ videos only😝
      On a serious note,
      Thanks a lot for your appreciation.
      Means a lot🖤
      If possible, please share the channel with your friends 🙂

    • @IamNGD
      @IamNGD 2 года назад +2

      @@uzairjavedakhtar3718 Sure sir🙏👍

  • @siddheshshrirame6909
    @siddheshshrirame6909 7 месяцев назад +5

    tackling such important topics , which are not covered on whole youtube with such grace and lucid explanation is really praisable.
    Hats off to you sirji.

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  7 месяцев назад

      Thanks a lot for your acknowledgement. Really means a lot🙂

  • @technohelper4855
    @technohelper4855 2 месяца назад +3

    I never comment .. but man this time I must say .. best explanation till now .. universities needs teachers like you

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  2 месяца назад

      Thanks a lot for your kind words...Really means a lot :)
      If you really feel so, share it with your university students out there😉

  • @josedamiansanchez9874
    @josedamiansanchez9874 Год назад +7

    Great example explained to differentiate the Asymptotic and Amortized analysis.

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  Год назад

      Haha! Had to think a lot before coming up with this😁
      Thanks for taking out time to acknowledge it🖤

  • @ur_fun
    @ur_fun Год назад +6

    i hope, i will see u become one of the best teachers in utube. tanx a lot. keep it up

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  Год назад

      Thanks A Lot for this beautiful comment😊
      This really made my day🖤🖤🖤

  • @ajinkyaawari575
    @ajinkyaawari575 Год назад +7

    Best explanation through out whole internet 🔥🔥

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  Год назад +2

      Now that's what I call the best comment through out whole internet😉

  • @rho992
    @rho992 Год назад +4

    Loved it... after watching so many video.. I can finally understand what we are actually even doing

  • @vishvajithbalajee
    @vishvajithbalajee Месяц назад +1

    hatsoff to your efforts sir, keep doing more videos on ADS.👍👍

  • @mr.curious1329
    @mr.curious1329 2 года назад +3

    Wonderfully explained.Compact and precise😃👍👍👍👍

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  2 года назад +1

      Thanks for your kind words..Keep learning!
      And don't forget to share my channel😉

  • @PerfectHilton
    @PerfectHilton Год назад +2

    Best video out here! Thanks

  • @niharikasingh769
    @niharikasingh769 2 года назад +10

    Didn't get one thing, in the second example: the asymptotic time complexity is for performing multipop n times which gives O(n^2) complexity but amortised complexity is for performing multipop(n) once and then pushing the elements back. This gives you O(n) complexity. But here also shouldn't we perform multipop n times. If we do that the time complexity will again be the same o(n^2). Basically my question is why we are not considering to perform multipop n times when finding amortised time complexity. I understand we don't have the elements left after 1st multipop but after pushing the elements back can't we perform multipop again and do it n times. Cause if it had to be done only once then even the asymptotic notation will give you O(n) complexity.

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  2 года назад +16

      Great Question!
      You are raising this question because you are thinking that what I calculated in the video was the time complexity of the multipop(n) operation....Had that been the case, you are right
      But, that was instead the time complexity of the data structure.
      Now, what is the time complexity of any data structure?
      Suppose I give you a chance to perform n operations on a data structure and I tell you that what is the worst case time complexity you can prove in these n operations?
      So, if you are a Asymptotic fan, you would say that you will do multipop(n) n times( as it is the most expensive operation), which is not possible continuosly as your stack gets empty after each operation.
      But if you are doing Amortized analysis, you will still try to do worst case operations, i.e. multipop(n) ..but remember that u can just perform n operations...in that case, once u perform one multipop(n) operation, u cannot perform the other one until the n+2 th operation.
      So in total, how many multipop(n) u can do in n operations? Just 1
      Hence , Time complexity for n operations comes out as O(n)
      If still any query, please ask 🙂
      Kindly share the video

    • @rho992
      @rho992 Год назад

      Thank you that makes it clear..

    • @OODevelopers
      @OODevelopers 8 месяцев назад

      What are all the n+2 operations here?

  • @ayushsuryawanshi9020
    @ayushsuryawanshi9020 Год назад +8

    Ofcourse Aman do better analysis than Asim

  • @evi5827
    @evi5827 3 месяца назад

    Why are the costs of TC1 O(n^2), when you multipop all n 1? wouldn't it be just one opertation of O(n), where the costs are O(1) for the whole stack? why multiply O(n) x n? Great video btw!

  • @himankgaming7555
    @himankgaming7555 Год назад +2

    6:20 i really though my earphone is gone before realising that the audio is like that
    BTW great explanation sir

  • @lol59767
    @lol59767 2 года назад +2

    Great explanation, thanks for sharing!

  • @om7g.103
    @om7g.103 5 месяцев назад +2

    Amortized Analysis
    Aysmptotic Notation - Big O Notation , Big Theta Notation
    Why amortized analysis is more important than asymptotic notation in some cases
    An example
    Augmented Stack

  • @mysterioustwist1894
    @mysterioustwist1894 Год назад +1

    Loved the explanation sir❤😊

  • @yomamasofat413
    @yomamasofat413 7 месяцев назад

    so to put it simply just look at the average? which is just O(1) because it happens most of the time

    • @BeingAplomb
      @BeingAplomb 6 месяцев назад

      Yes that's the actual meaning of Amortized analysis ... Average time complexity of each operation

  • @b_01_aditidonode43
    @b_01_aditidonode43 Год назад +1

    amazing explaination

  • @minhazfuad7493
    @minhazfuad7493 Год назад

    Thank you so much, it was really helpful...

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  Год назад

      If it was helpful, it's worth it for me😊
      Thanks for the appreciation🖤

  • @sargamgupta7134
    @sargamgupta7134 2 года назад +1

    Great explanation!

  • @AshutoshKumar-lp5xl
    @AshutoshKumar-lp5xl 2 года назад +1

    clear and understandable

  • @enzoarguello512
    @enzoarguello512 Год назад +1

    Thank you so much!!

  • @timz2917
    @timz2917 8 месяцев назад

    why was it not 2n / n +1

  • @deepakgoyal3250
    @deepakgoyal3250 10 месяцев назад +1

    And he saved me

  • @Abhijeetgaming274
    @Abhijeetgaming274 2 года назад +2

    next videos?

    • @uzairjavedakhtar3718
      @uzairjavedakhtar3718  2 года назад

      Entire playlist link : ruclips.net/p/PLv9sD0fPjvSHqIOLTIvHJWjkdH0IdzmXT

  • @mikedelta658
    @mikedelta658 Год назад +1

    Thank you!

  • @unnatigoel809
    @unnatigoel809 2 года назад +1

    Masth

  • @manishvishnu2654
    @manishvishnu2654 2 года назад

    💖

  • @trijalsharma4471
    @trijalsharma4471 29 дней назад

    😒