Skip to content

Commit 1ba58d2

Browse files
committed
Build issue fix for swap function
1 parent 65ddffc commit 1ba58d2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/com/thealgorithms/randomized/RandomizedQuickSort.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ private static int partition(int[] arr, int low, int high) {
5757
* @param j the second index
5858
*/
5959
private static void swap(int[] arr, int i, int j) {
60-
if (i == j) return; // Skip if indices are the same
60+
// Skip if indices are the same
61+
if (i == j) {
62+
return;
63+
}
6164
int temp = arr[i];
6265
arr[i] = arr[j];
6366
arr[j] = temp;

0 commit comments

Comments
 (0)