From 99a2e5839f53041cd00a7106ce43326078488b65 Mon Sep 17 00:00:00 2001 From: Rasmus Knoth Nielsen Date: Tue, 29 Oct 2019 20:29:01 +0100 Subject: [PATCH] Added BubbleSort as a Sorting Algorithm --- Sorting Algorithms/BubbleSort.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sorting Algorithms/BubbleSort.java b/Sorting Algorithms/BubbleSort.java index c35bc92..1bc6c15 100644 --- a/Sorting Algorithms/BubbleSort.java +++ b/Sorting Algorithms/BubbleSort.java @@ -11,7 +11,7 @@ void bubbleSort(int arr[]) for (int j = 0; j < n-i-1; j++) if (arr[j] > arr[j+1]) { - // swap arr[j+1] and arr[i] + // swap arr[j+1] and arr[j] int temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp;