Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PHP code only Morse Code Morse Code is delivered in a series signals which are referred to as dashes (-) or dots (.). To keep

PHP code only

Morse Code Morse Code is delivered in a series signals which are referred to as dashes (-) or dots (.). To keep things simple for the purposes of this challenge we'll only decode letters with a maximum length of three signals.

Morse Code Graph

Here is the Morse Code dichotomic search table courtesy of Wikipedia

Morse Code Examples -.- translates to K ... translates to S .- translates to A -- translates to M . translates to E

Background You've started work as morse code translator. Unfortunately some of the signals aren't as distinguishable as others and there are times where a . seems indistinguishable from -. In these cases you write down a ? so that you can figure out what all the posibilities of that letter for that word are later.

Task Write a function possibilities that will take a string word and return an array of possible characters that the morse code word could represent.

Examples with ? ? should return ['E','T'] ?. should return ['I','N'] .? should return ['I','A'] ?-? should return ['R','W','G','O']

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

Give a chemical explanation for each of the following:

Answered: 1 week ago

Question

Did you pick a topic that you know all about?

Answered: 1 week ago