Amazon | Technical Phone Screen | SDE <not sure>| Longest Common Word
Anonymous User
3509

Behavioral : Can you talk about a time when you got something wrong? What was it and what did you do?

Technical: Find the longest common word in the list of words. Words are delimited by multiple spaces.
Input: ["Echo", "Alexa", "Kindle", "Echo Show", "Amazon"]
Output: "Echo"

Input: ["Echo Show", "Echo Show 8"]
Output: "Echo Show"

If there are multiple longest common words, return an empty string. If there is no common word, return an empty string.

Comments (6)