Level: Intern
Round: Full Journey · Type: Multiple Types · Difficulty: 6/10 · Duration: 120 min
Topics: Behavioral, String Manipulation, Dynamic Programming
Location: Seattle, WA, US
Interview date: 2026-01-19
Question:
Question:
The first coding question involves iterating through each word, then each letter of the word, constructing its Morse code, using a set to record the different codes, and then returning the set length. I had seen this type of problem before.
For the second coding question, I used dynamic programming and modified the dp array to store vectors. For element dp[i] in the vector, it represents a word from s[j] to s[i]. The segmentation result of s is stored in such (j, i) tuples. The problem can be solved by reverse searching these (j, i) tuples from dp[s.size()] and concatenating the string s using recursion.