Java: QuickSort Explained

preview_player
Показать описание
A detailed explanation of how the QuickSort sorting algorithm works, and tutorial on how to code it in a Java program.

Рекомендации по теме
Комментарии
Автор

Out of several videos I have watched on QuickSort, yours is the easiest to understand in my opinion. Thank you!

s
Автор

Out of all algorithms videos I watch, urs is the last one I need to see. So now I see just yours.

ankitasinha
Автор

Programming is not explained good but algorithm explanation is awesome, I can code now by using your algorithm.

developwithcoding
Автор

hi Joe, Initially the logic that you explained using 2 pointers, one incrementing and the other decrementing is fine. But if you try to convert it to a program is not working for me. Also the code that you have given does not follow the logic that you have explained initially. am I missing something here? Thanks, Sam

svdfxd
Автор

This is actually explained well enough for me to try to write the code at the 3:54 mark, wish me luck!


Update: I failed, came crawling back, and now I feel dumb. I need a lot more practice coding

portobellomushroom
Автор

Excellent explanation, I understood everything before the 4th minute of this video.

shadmansudipto
Автор

out of all explanations of quick sort, this one is the easiest to understand, thanks for creating this!

rakshakannu
Автор

Hi Joe, The slide show and the code are different in logic. There were two pointers, one incrementing, other decrementing and swapping with each other before finally swapping with the pivot value. The code in the notepad++ however talks about comparing all the items iteratively with the chosen pivot value.

MrThegreymatter
Автор

Excellent, excellent presentation - thank you! Hope you and yours are doing well in these interesting times!

iggykarpov
Автор

So my data structure teacher is not an easy guy. He made us create a class for the whole classroom, and each one of us is trying a different sorting method, in order to measure its efficiency. Unfortunately, we are not supposed to sort and array, but a simple linked list, and the nodes are supposed to be generic.
Is hard to do! I have to do it anyway, but I had to take it out.
Your video is quite good, clear, and simple, as it should be, you´re doing a great job there

ramonavima
Автор

The best explanation I've found on youtube so far. Thank you Joe James

decisionguider
Автор

Very useful and well explained! Now I know I can use this sort method for large arrays and Insertion sort for short arrays to be efficient.

TonyBlundetto
Автор

You hoped right Joe James! The video was quite helpful. Helpful enough to help me use it explain the quick sort concepts to my classmates. Thank you for your clear explanation!

seuntaylor
Автор

Best explanation, thank you very much!

savoterzic
Автор

i dont understand the if (low < high + 1) condition in the private quickSort method, particularly why do we add 1 to high?

ian_senior
Автор

I feel like the partition method doesn't match up with the graphic you showed us at the beginning of the video.

Jdb
Автор

Well, I think this version of partition is easier to understand.

private int partision(int[] a, int left, int right) {
int pivot = a[getPivot(left, right)];
while (left < right) {
while (a[left] < pivot && left < right) left++;
while (a[right] > pivot && left < right) right--;
if (left < right) {
swap(a, left++, right--);
}
}
return left;
}

mounachuang
Автор

am I the only one who thinks this is difficult

pablobiedma
Автор

really nice tutorial, very very helpful, thank you for this 👍👍🙂🙂

SmartProgramming
Автор

Can you explain why your code does NOT match your algorithm logic explanation? And which one is more correct?

babygirlsimone