I tried running the full recursive code of bubble sort and it gives array index out of bound exception , please check.
Code :
private static void fullRecursiveBubbleSort(List list2, int i, int n) {
if(n == 1) {
return;
}
if(i == n-1) {
fullRecursiveBubbleSort(list2, 0, n-1);
}
if(list2.get(i) > list2.get(i + 1)) {
Collections.swap(list2, i, i + 1);
}
fullRecursiveBubbleSort(list2, i+1, n);
}