No one uses it any more
static void bubbleSort(int[] arr, int n) { if (n == 1) { return; } IntStream.range(0, n - 1).forEach(i -> { int j = i + 1; if (arr[i] > arr[j]) { int tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; } }); bubbleSort(arr, n - 1); }