Microsoft interview question

implement factorial method

Interview Answer

Anonymous

21 Aug 2012

the simple answer would be : def factorial(a): if a == 0: return 1 else: return a * factorial(a-1)