In this kata you have to write a simple Morse code decoder. While the Morse code is now mostly superceded by voice and digital data communication channels, it still has its use in some applications around the world.
The Morse code encodes every character as a sequence of "dots" and "dashes". For example, the letter
A
is coded as·−
, letterQ
is coded as−−·−
, and digit1
is coded as·−−−−
. The Morse code is case-insensitive, traditionally capital letters are used. When the message is written in Morse code, a single space is used to separate the character codes and 3 spaces are used to separate words. For example, the messageHEY JUDE
in Morse code is···· · −·−− ·−−− ··− −·· ·
.NOTE: Extra spaces before or after the code have no meaning and shou
[codewars][Java] 翻译摩斯码
最新推荐文章于 2022-06-08 22:05:57 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)