2 ms·
Agreed, pretty clever way of getting some serious penetration testing done. By the way, apparently this snippet does the trick: @rubx f = Hash.new {|h,k| h[
by mustpax 18y ago
Agreed, pretty clever way of getting some serious penetration testing done.
By the way, apparently this snippet does the trick:
@rubx f = Hash.new {|h,k| h[k] = h[k-1]+h[k-2]};f[0]=1;f[1]=1;f[1000000]
It looks like it calculates the 1,000,000th fibonacci number, with decent runtime complexity (not so much with memory). I don't know Ruby though, is there anything peculiar about the snippet?