Piotr Weglarz wrote:Is there any way to get rid of rid of this, or should I just assume that its not possible to do?
Almost anything is possible in programming; the question is: is it a good idea?
In your case, I have a feeling that your prof might be trying to point you towards a recursive solution, where each branch is dealt with by calling the
same method again. It's tricky but, especially for things like trees, often produces very elegant solutions.
Winston