Morgan Stanley·Software Engineer·Technical Phone Screen
Jun 2026
Morgan Stanley software engineer interview that was basically one meaty dynamic programming problem. The question had enough edge cases to keep you busy for a while, and they wanted the full treatment: working solution, complexity analysis, and a follow-up optimization.
- Given a non-empty string of digits, count the number of ways to decode it using the mapping 1→'a', 2→'b', ..., 26→'z'. Zeros can only appear as part of '10' or '20'. Implement an O(n) solution in C++, explain how you handle zeros and invalid states, analyze time and space complexity, and provide a space-optimized version.
“I knew this was a DP problem the second I read it, but the zeros tripped me up more than I expected.” The rest of the author's notes on Software Engineer interview at Morgan Stanley, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post