My homework is to create a recursive static method that receives an arraylist of integers as a parameter. Say that there are elements which have a value of 0 and I want to switch it to 5, elements which have a value of 1 are removed, and elements which have a value of 2 are moved to the end. The rest stays as is.
I can think of ways to do it without using recursion, but how could I solve this problem with using recursion?
Thank you.