[bug]
class Solution {
public void hanota(List<Integer> A, List<Integer> B, List<Integer> C) {
int n = A.size();
f(n, A, B, C);
}
void f(int n, List A, List B, List C){
if(n==1){
C.add(A.remove(0);
return;
}
f(n-1, A, C, B);
C.add(A.remove(0);
f(n-1, B, A, C);
}
}```