I get a stackoverflowerror due to my recursion creating an infinite loop. Turning the method into an iteration would stop this, but I have no idea how!
Can a