i'm getting StackOverflowError
to my recursive call:
Exception in thread "main" java.lang.StackOverflowError
at Test.trailMngr(Test.java:112)
at Test.trailMngr(Test.java:115)
at Test.trailMngr(Test.java:115)
at Test.trailMngr(Test.java:115)
at Test.trailMngr(Test.java:115)
...
Java Result: 1
Is there a way to fix this without changing the code?
The only way i can think of is making it a non-recursive method.
Everything else in the code is working fine in smaller input sizes-- i'll avoid the change if possible (although i'm not hopeful).
Not well-familiar with how Java behaves on these things.
TIA.