Amazon·Data Scientist·Online Assessment (OA)
- Given an array of words, map each word to its Morse code representation by concatenating the codes for each letter, then return the count of distinct Morse code strings across all words.
- Given a string and a word dictionary, return all possible ways to split the string into a sentence where every word appears in the dictionary. Words can be reused.
“Pretty straightforward once you just hardcode the 26-letter mapping and throw everything into a set.”