From 340743a86025e2c302319bad81ef259620d69345 Mon Sep 17 00:00:00 2001 From: prabhat gaurav Date: Tue, 27 Oct 2020 01:11:01 +0530 Subject: [PATCH] short the code --- c/quick_sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/quick_sort.c b/c/quick_sort.c index a79deb52e..d1d51df6a 100644 --- a/c/quick_sort.c +++ b/c/quick_sort.c @@ -20,7 +20,7 @@ int partition (int arr[], int low, int high) int pivot = arr[high]; // pivot int i = (low - 1); // Index of smaller element - for (int j = low; j <= high- 1; j++) + for (int j = low; j < high; j++) { // If current element is smaller than or // equal to pivot