Quick sort is an sorting algorithm based on recursion
In this Video I will explain Quick sort algorithm.
Quick sort is used in most libraries, because of its average time complexity (wich is better than merge and heap sort)
How quick sort work ?
Quick sort takes last number (pivot) and put it in its corect place by moving smaller numbers on it's left side and bigger numbers on it's right side.
But How does Quick sort sort an array ?
well when we have our pivot in correct place, we recursively call quick sort on left and righ side of our pivot.
and the recursion stops once the part that we are sorting have only one (or none) numbers.
Quick sort have time complexity of Big O n squared
but in average case it is n * log n.
Tags:
Quick Sort Explained in 5 minutes
Теги
Quick sortquick sort explainedquick sort algorithmquick sort animationquick sort examplehow does quick sort sort an arrayquick sort step by steprecursionquicksortalgorithmsortingquick sort analysisquick sort example step by stepsort array using quick sortwhat is quick sortquick sort with examplealgorithmsbubble sortdata structuretutorialcomputer sciencedivide and conquercomputerprogrammingsorting algorithm