diff --git a/bubble_sort/Cpp/bubble_sort.cpp b/bubble_sort/Cpp/bubble_sort.cpp index 7afbf06d..a162dd74 100644 --- a/bubble_sort/Cpp/bubble_sort.cpp +++ b/bubble_sort/Cpp/bubble_sort.cpp @@ -18,7 +18,7 @@ void bubble_sort(int arr[], int n) { } } - // If no two elements were swapped by inner loop, then break + // If no two elements were swapped by inner loop, then break. if (swapped == false) break; } @@ -29,11 +29,10 @@ void print_array(int arr[], int size) { int i; for (i = 0; i < size; i++) printf("%d ", arr[i]); - printf("\n"); } -// Driver program to test above functions +// Driver program to test above functions. int main() { int arr[] = {64, 34, 25, 12, 22, 11, 90}; int n = sizeof(arr) / sizeof(arr[0]);