← Morgan Stanley questions

Recursive and Iterative Factorial

Filed under Morgan Stanley

Write both recursive and iterative implementations to compute the factorial of a non-negative integer, and discuss their trade-offs in terms of time and space complexity.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.