A simple Morse code decoder that uses a dictionary to find the possible word matches from the Morse code message (Reverse engineering the Morse code message to find the correct phrase).
You have been given a Morse code message with missing spaces between each character encoding. If you use an online Morse decoder, it will fail to decode the message. For example, if you encode "awesome" and "eyesome", their encodings will be the same after removing the spaces: .-.--....-----.
Your task is to find the correct popular phrase from the Morse code message.
Morse code message: -...../..-.-..-..--.--./--.-..-....-..----./---..-./.-......-../-...../..--......-..-...../.--.-../....-..-.-.---......-.--./.....
$ npm run decode