Code Monkey home page Code Monkey logo

morse_possiblities's Introduction

Morse Code

Overview

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. 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 signals and return an array of possible characters that the Morse code signals could represent.

Specification

possibilities(signals) Parameters signals: String - The Morse code signals that needs to be parsed. The may contain one or more unknown signals (?). Return Value Array - The list of possible letters for the given group of signals. Letters will always be ordered from how they appear on the chart, from left to right. Constraints There will be no more than 3 characters within signals. 0 - 3 unknown signals may be given.

morse_possiblities's People

Contributors

tiger0105 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.