How would you write a non-recursive algorithm to compute n!?
n!
I love the pythonic solution to this:
def fact(n): return (reduce(lambda x, y: x * y, xrange(1, n+1)))