Hm... I had a program that need to recurs pretty deep before. I realise that going too deep will cause a stack overflow (duh)

So... what I did is to segment out the data chunck, and run the recursion to work with small chunck of data each time.

For example, I have a array of 5000 element, instead of letting a single function to recurs and go into 5000 level deep, I devide out the recursion into 50 times, with each time it process 100 element, save up the result some where else, and continue with the remaining, in the end, the element I neeed to process is getting smaller and smaller... and at the end I get the cvalue I want.

Is is posible to implement such work areound for you?