From d5a71d3cad7ab9ac272384d836286f3aee5c51bb Mon Sep 17 00:00:00 2001 From: PriyanshuNandan Date: Wed, 3 Oct 2018 15:19:14 +0530 Subject: [PATCH] changes to comments of quick_sort.c --- code/code/sorting/src/quick_sort/quick_sort.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/code/sorting/src/quick_sort/quick_sort.c b/code/code/sorting/src/quick_sort/quick_sort.c index 5e4b364..529dd85 100644 --- a/code/code/sorting/src/quick_sort/quick_sort.c +++ b/code/code/sorting/src/quick_sort/quick_sort.c @@ -9,8 +9,8 @@ void swap(int *p, int *q) } -//Last element is used a spivot -//Places elements smaller than pivot to its left side +//Last element is used as pivot +//Places elements smaller than or equal to pivot to its left side //Places elements larger than pivot to its right side int partition(int a[], int low, int high) { @@ -64,4 +64,4 @@ int main() printf("Sorted array: "); print(a, n); return 0; -} +} \ No newline at end of file