Analysis of Quick Sort Algorithm | Time complexity of Quick Sort Algorithm | O(n^2) | O(n log n)
HTML-код
- Опубликовано: 5 фев 2025
- This video will give you an in depth analysis of quick sort algorithm.
Best case - O(n log n)
Worst Case - O (n^2)
Average Case - O(n log n)
Hi all,
If you have any doubt or query, feel free to write a comment ✍️ to clarify it.
One of the best lecture ever , 🔥 always I am bit confusing with time complexity , now it is totally clear 🤗 thanks to u mam , I really appreciate you efforts 🤗 keep doing such good explanations .
Ma'am Your Explanation is the best I've found compared to websites and other videos .
Thank u so much. I wasn't able to understand this but after seeing ur video finding time complexity seems easier.🙏
Completely understood!
I have never seen such a clean explanation about complexities of the algorithms.
Please upload more videos especially a playlist on learning complexities from basic to advance problems.
Will upload soon
The lecture was to the point with proper information....Goooood!
you r a good teacher 😇😇
Your teaching skill is way better than other😄
nicely explained worst case where many did not ! thanks..
Thank you so much for helping me understand this basic concept :)
completely understood!! nice and clean video.
i am very thankful for this
Ma'am your explanations was super clear, and highly expect such a good analysis for other algorithms too :)
Sure and Thanks a lot.
Hi!!! You're helped me a lot, your video is very clear :^) thank you ✨
Best explanation ever
a very clean explanation mam
you're the best ! thank you !
Thank You Maam!!
Thanks!
please do video on average case analysis for quick sort
Why the sum is 2+3+4+5+6+7.... Jab waha par right sub tree me sirf 16 he...to tab to 1 hona chahiye?
Can you also provide analysis of decending array worst case
I don't know why your channel has few subscribers
Nice explanation but where's the AVG case
with n=8; is there any chance we can generate best case array for a quick sort algorithm, please clarify? thank you. for example, we choose pivot as middle of array.
mam for average ,when we say quicksort algorithm is average
Mam why are you not uploading videos
so does that mean that the worst case will change to nlogn if we take the median as pivot????
It reduces the likelihood of worst case scenario, but does not guarantee to O(n log n) always, because median is depending on the distribution of data and to select median again sorting is required. Hope it helps you!!
Mam .. the array is already sorted then it might be a best case.. this is only you teached in last vdos but here the worst case is in the sorted list and best case is in the unsorted list .. I can't understand can you clarify..
@NK Every algorithm is different from each other. You are not blindly say that all algorithm's best case occur for only sorted list. Some might work well for sorted list, other might work well for unsorted list, depending on algorithm's behavior. This quick sort algorithm does not fit well for the sorted list because of the pivot element it's choosing & it's working behavior.
@@cstalksbylee4434 thank you so much mam now its clear🙏
Space complexity?
Mam Average case?
@NANCY M For average case also same steps only but you will not get evenly balanced partition like best case( always n/2 elements in left and right child of recursion tree so all the leaf nodes will be in same level). So in avg.case you will not get log n base 2 levels instead log n with some other base value, anyway that is differ by constant value only which will be ignored in asymptotic notations. So we can say O(n log n)
average case not discussed!
What abt average case mam
That is also O(nlogn) only..
Nice explanation 👍
Mam average case time complexity will also follow the same steps like best case?
@Hummair khan For average case also same steps only but you will not get evenly balanced partition like best case( always n/2 elements in left and right child of recursion tree so all the leaf nodes will be in same level). So in avg.case you will not get log n base 2 levels instead log n with some other base value, anyway that is differ by constant value only which will be ignored in asymptotic notations. So we can say O(n log n)
Mam please upload full DAA
Follow this regularly I'll be uploading DAA from basics to advanced level. ruclips.net/video/1Zr0Z3Hvzxg/видео.html
Aoa , plz tell me [n(n+1)/2}-1 what is this?
@Ghjk Yuio sum of first n natural numbers when starts from 1 is ==> [n(n+1)/2], but in this worst case, the series is starting from 2 not 1, so subtract 1 from it. ==>[n(n+1)/2] - 1.
thank you very much such a beautiful video of all lactures of all time comlexity.
Plz add more video like merge sort heap sort etc..
We'll upload soon.