Hi All,
I am trying to encode recursion using
Java.
I would like to know an efficient approch where I can bring down the nummber of variables being passed as method parameters. - Without adding to the Method Call Stack - I basically would like to come up with an approach which would make use of least number of local variables per method call.
for ex
In merge sort we basically use recursion, basically call recursion using divide & conquer technique.
but in worst case scenario if there ar many number of elements there would be lot of variables added to the method call stack.
is there a way around this ?