NTT DATA Interview Question

Multiple ways to write a function who return a factorial