namanvats / cpalgorithms

Algorithms and Techniques for competitive programming
MIT License
18 stars 29 forks source link

Java program to implement quick sort #4

Closed advaith-unnikrishnan closed 4 years ago

advaith-unnikrishnan commented 5 years ago

QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. The key process in quickSort is partition(). Target of partitions is, given an array and an element x of array as pivot, put x at its correct position in sorted array and put all smaller elements (smaller than x) before x, and put all greater elements (greater than x) after x. All this should be done in linear time.

namanvats commented 5 years ago

I cannot merge it until you make your program in a new folder named sorting algorithms and name the program as "quick_sort_java.java"I have already mentioned it.