diff --git a/guide/english/algorithms/sorting-algorithms/quick-sort/index.md b/guide/english/algorithms/sorting-algorithms/quick-sort/index.md index 5e8cc13cfb..9743d8deba 100644 --- a/guide/english/algorithms/sorting-algorithms/quick-sort/index.md +++ b/guide/english/algorithms/sorting-algorithms/quick-sort/index.md @@ -3,7 +3,7 @@ title: Quick Sort --- ## Quick Sort -Quick sort is an efficient divide and conquer sorting algorithm. Average case time complexity of Quick Sort is O(nlog(n)) with worst case time complexity being O(n^2). +Quick sort is an efficient divide and conquer sorting algorithm. Average case time complexity of Quick Sort is O(nlog(n)) with worst case time complexity being O(n^2) depending on the selection of the pivot element, which divides the current array into two sub arrays. For instance, the time complexity of Quick Sort is approximately O(nlog(n)) when the selection of pivot divides original array into two nearly equal sized sub arrays. On the other hand, if the algorithm, which selects of pivot element of the input arrays, consistently outputs 2 sub arrays with a large difference in terms of array sizes, quick sort algorithm can achieve the worst case time complexity of O(n^2). The steps involved in Quick Sort are: - Choose an element to serve as a pivot, in this case, the last element of the array is the pivot.