Jano Svitok wrote:
> On 9/19/07, Ruby Newbie <yeshvanthni / gmail.com> wrote:
>> Does using blocks improve it over using 'For'.Please give explanation.
> 
> Find out yourself: write both versions and compare them using
> Benchmark class (my guess is that they are more or less the same).
> 
> 

i wrote them more clearly for you, you should see from this that 
recursive algorithm uses much more operations - every number have to run 
2 threads, and each of thease have to run another 2, that gives you 2^n 
method calls, each of them have one arythmetic operation.

where iteration one takes one method call and n*3 arythmetic operations

benchmark for big n should give you clear picture, you can also use 
profiler or count method cals and operations. besides, you are CS major 
on university, why are you posting your homework here and ask us for 
answers than complain we don't give you them ?