Decode Morse Code to All Possible Original Strings

Asked at Oscar Health · Coding Questions · Difficulty: Medium

Given a mapping from lowercase letters `a-z` to Morse code and a Morse string `code` consisting only of `.` and `-`, return all possible original strings (over `a-z`) whose Morse-encoding equals `code` exactly.

Loading the problem…