April 30d Coding Challenge > Morse Code I
Morse code, named for Samuel F. B. Morse, is a method of transmitting text information as a series of clicks that can be directly understood by a skilled listener or observer without special equipment.
Write a program to convert a given morse code back to english text. Individual letters will be separated by spaces
Input: ... -.. . ... -.- .. .-.. .-.. ...
Output: SDESKILLS
Javascript array for the codes.
var code = {
a: '._', b: '_...', c: '_._.', d: '_..', e: '.', f: '.._.',
g: '__.', h: '....', i: '..', j: '.___', k: '_._', l: '._..',
m: '__', n: '_.', o: '___', p: '.__.', q: '__._', r: '._.',
s: '...', t: '_', u: '.._', v: '..._', w: '.__', x: '_.._',
y: '_.__', z: '__..', 0: '_____', 1: '.____', 2: '..___', 3: '...__',
4: '...._', 5: '.....', 6: '_....', 7: '__...', 8: '___..', 9: '____.'
};
To Discuss more and follow up, join us at SDE Skills Discord Server, use the #women-in-tech channel.
Note: While there is no submission deadline per-se, we recommend you answer these questions as soon as they are posted.