Time complexity: Best and Worst cases | Quick Sort | Appliedcourse

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024
  • Chapter Name: Quick Sort
    Please visit: gate.appliedro..., interviewprep....
    For any queries you can either drop a mail to Gatecse@appliedroots.com or call us at +91 844-844-0102

ความคิดเห็น • 48

  • @bibhuprasadsubudhi1340
    @bibhuprasadsubudhi1340 10 หลายเดือนก่อน

    this ia what we students call a osm techer .love this session .thank you so much sir .

  • @nikhilgautam007
    @nikhilgautam007 3 ปีที่แล้ว +1

    Best video for understanding the time complexity of quick sort algorithm.😎👌👌

  • @frazebean5117
    @frazebean5117 4 หลายเดือนก่อน

    You're a legend man. I wish you all the best in your teaching journey cos you're gifted in it.

  • @rohithberavelli1941
    @rohithberavelli1941 4 ปีที่แล้ว +3

    perfectly done by quick sort with your video.thanks for your explanation

  • @achronicstudent
    @achronicstudent 4 หลายเดือนก่อน

    I have question about 4:21 about drawing recursion tree. I always draw them like for each node, calculating the work done in this node. (as shown in Introduction to Algorithms 4th Leiserson Stein Rivest Cormen MIT Press p. 96) using this approach the recursion tree drawn should be n ---> cn, n-1--->c(n-1), n-2 ---> c(n-2), ... 1 ---> 1 but you draw it slightly different. I guess both approach gives the correct results for the example in p. 96 but i am not sure. Can you explain it a bit further?

  • @anurag9110
    @anurag9110 4 ปีที่แล้ว +1

    Nice explanation. Thanks

  • @debaratighatak2211
    @debaratighatak2211 3 ปีที่แล้ว +1

    What an amazing explanation sir! Thank you :)

  • @draaagoo7799
    @draaagoo7799 10 หลายเดือนก่อน

    Brilliant explanation!!

  • @durgeshbhakta8008
    @durgeshbhakta8008 4 ปีที่แล้ว +1

    Good explanation sir 👍

  • @hakan6449
    @hakan6449 9 หลายเดือนก่อน

    Good explanation

  • @prasannasasne81
    @prasannasasne81 4 ปีที่แล้ว +4

    at 11.46 you have mentioned the depth of the tree i.e log n to the base (10/9). can you please explain how you are calculating this depth?

    • @vivekmishra007
      @vivekmishra007 4 ปีที่แล้ว +1

      @Prasanna Sasne In the case when the array is divided into 1/10 and 9/10 of the total size we have to consider the part of the recursion tree with the maximum height, the tree one part is getting divided by 10 and another part by 10/9 so as 10/9

    • @exploringnaturalbeauty2102
      @exploringnaturalbeauty2102 3 ปีที่แล้ว

      @@vivekmishra007 Damn thanks bro , lucid explanation to the point , I want to be in contact with you , so do you have an email where I can mail you if I have any doubt or we can stick to this TH-cam comment section too..
      Depends on your comfort
      Thanks !

  • @shashipreetham2882
    @shashipreetham2882 3 ปีที่แล้ว

    Splendid Explanation!

  • @RahulGupta-rl8xd
    @RahulGupta-rl8xd 4 ปีที่แล้ว +1

    Thanks for help

  • @picklerick3136
    @picklerick3136 4 ปีที่แล้ว +3

    Thank you sir! Very inspiring!

    • @picklerick3136
      @picklerick3136 3 ปีที่แล้ว

      @Dayton Taylor nobody will give a damn because it’s a scam

    • @picklerick3136
      @picklerick3136 3 ปีที่แล้ว

      @Caden Jaiden yeah, and what a coincidence, you two both joined TH-cam one week ago

  • @vaishnaviyogendradere17
    @vaishnaviyogendradere17 ปีที่แล้ว

    Great sir 👏👏

  • @sanashoukat477
    @sanashoukat477 ปีที่แล้ว

    make a video for heap sort.

  • @giantpanda504
    @giantpanda504 3 ปีที่แล้ว +1

    when you analyze the worst case for quicksort, x is the smallest element as you said. so the n1 from Partitioning should be all bigger than x. But you wrote the symptom of

    • @jerrykayson4145
      @jerrykayson4145 3 ปีที่แล้ว

      sorry to be offtopic but does someone know of a tool to log back into an instagram account??
      I was dumb forgot my account password. I would appreciate any tricks you can give me.

    • @rivergus501
      @rivergus501 3 ปีที่แล้ว

      @Jerry Kayson instablaster ;)

    • @jerrykayson4145
      @jerrykayson4145 3 ปีที่แล้ว

      @River Gus I really appreciate your reply. I found the site through google and im trying it out now.
      Looks like it's gonna take quite some time so I will get back to you later with my results.

    • @jerrykayson4145
      @jerrykayson4145 3 ปีที่แล้ว

      @River Gus It did the trick and I finally got access to my account again. I am so happy:D
      Thank you so much you saved my account :D

    • @rivergus501
      @rivergus501 3 ปีที่แล้ว

      @Jerry Kayson glad I could help =)

  • @louerleseigneur4532
    @louerleseigneur4532 4 ปีที่แล้ว

    Thank you very much sir ji

  • @livingston8267
    @livingston8267 3 ปีที่แล้ว

    Amazing sir❤

  • @hirafarman8011
    @hirafarman8011 2 ปีที่แล้ว

    great

  • @Arjunsiva
    @Arjunsiva 4 ปีที่แล้ว

    That was very helpful

  • @jagannathanvijaylakshmi5385
    @jagannathanvijaylakshmi5385 3 ปีที่แล้ว

    Can u tell me which software is being used? I mean how to write with mouse.. sir..are u using any digital pen or something?

  • @sayantaniguha8519
    @sayantaniguha8519 3 ปีที่แล้ว

    So,
    Almost Best case is average case ?

  • @naniscompass3173
    @naniscompass3173 2 ปีที่แล้ว

    What is the name for this teaching tool (colour pens)?

  • @gabrielpereiramendes3463
    @gabrielpereiramendes3463 4 ปีที่แล้ว

    #Excelent!

  • @aayushpagare9366
    @aayushpagare9366 4 ปีที่แล้ว +1

    🙇🏻‍♂️

  • @Momo-hr2yd
    @Momo-hr2yd 10 หลายเดือนก่อน

    Kosom the ziognist

  • @uttamkarmakarece3534
    @uttamkarmakarece3534 3 ปีที่แล้ว

    ❤️❤️❤️

  • @rafiqn2675
    @rafiqn2675 3 ปีที่แล้ว

    Bayya how to convert head recursion to tail recursion (tail call optimisation) please make video on it...

  • @louerleseigneur4532
    @louerleseigneur4532 4 ปีที่แล้ว

    brovo

  • @uberboy6986
    @uberboy6986 4 ปีที่แล้ว

    You cannot say that Quick Sort's time complexity is Big-oh of nlogn because it's not. Big-oh represent it's worst case and the worst case time complexity of quick sort is O(n²). To represent the average case you should use Big-Omega which is another symbol: Ω(n log n). Try not to explain difficult subjects to other people if you are not sure about it, it's hard to understand it and it gets even harder if many people say different things about it.

    • @redkai11
      @redkai11 3 ปีที่แล้ว +5

      That is common misconception. Big-o does not represent its worst case and big-omega does not represent average case. Big-o is just the upper bound and big-omega is just the lower bound of time complexity. For worst case, quicksort is actually theta(n^2) so it is completely valid to say quicksort's time complexity is O(n^2) when we are considering the worst case. For best case, quicksort's time complexity is theta(nlog(n)) so it is, again, completely valid to say o(nlog(n)) or big-omega(nlog(n)).

    • @uberboy6986
      @uberboy6986 3 ปีที่แล้ว

      @@redkai11 I'm talking about the part that he says that we can call it O(n log n) for the Quick Sort's time complexity ( 13:20 ).

    • @redkai11
      @redkai11 3 ปีที่แล้ว

      @@uberboy6986 the time complexity of theta(nlog(n)) implies O(nlog(n)) so he is actually right?

    • @uberboy6986
      @uberboy6986 3 ปีที่แล้ว

      @@redkai11 Theta(n log(n)) doesn't implies O(n log(n)). Quick Sort time complexity is O(n^2), Theta(n log(n)) and Omega(n log(n)). Google it.

    • @redkai11
      @redkai11 3 ปีที่แล้ว +4

      @@uberboy6986 at this point, I am convinced that you don't know what theta is and its relation to big-o and big-omega. maybe try digging into google more and you will find that anything of theta(f(x)) is also O(f(x)) and big-omega(f(x))