← Morgan Stanley questions

Pow(x, y) using DP and Recursion

Filed under Morgan Stanley

Implement a function to calculate pow(x, y) (x raised to the power y) using both recursion and dynamic programming (memoization/iterative), and analyze their time and space complexities.

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.