BNY interview question

Q1 : Diff ways to write Factorial function