If some computation is to be done by running a loop then is it better to do recursion inside the function or return the array and do the computation outside the recursive function? Time complexity wise which wins?