Using ArrayList<int>

to be honest it would have taken me at least an hour if I wasn’t thinking of how to explain the program and randomly opening it on the } else if() { part, while thinking of a random thing

well trouble shooting is usually 60% luck