2012-05-04, 12:07 AM
thinbear Wrote:When the array is passed into the function, does it passed as reference or by value?
If the array is cloned many times, it would slow down a lot; delete the intermediate arrays immediately when it become useless (vs. waiting for garbage collection) will help speeding up the recursive process;
I haven't deal with java for a long time, so I could be wrong.
It's passed by reference in Java so there's no problem there.

