Skip to content

A python module that creates a complete and balanced binary tree for morse code. By using that module you can decode or translate morse code string to its sentence.

License

Notifications You must be signed in to change notification settings

bbkelleroglu/morseDecoderBinaryTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

morseDecoderBinaryTree

A python module that creates a complete and balanced binary tree for morse code. By using that module you can decode or translate morse code string to its sentence.

Screen Shot 2019-05-15 at 20 26 17

The above decision tree is in the form of complete and balanced binary tree like a binary-heap. Starting root node does not contain any value, all the left nodes have a dot (.) and right nodes have a line (-) as a decision expansion. Some characters may have 1, some may have 2, 3, 4 or 5 notations. For example: A : .- X : -..-

A python code which I used this binary tree while decoding Morse alphabet. Finding left and right child of each node indexes in this tree with the formulas that I used in binary heap (i.e. left= 2j, right= 2j+1)

You can test my code by using this morse code string : .-- .. - .... .-.- -- -.-- .-.- -... . ... - .-.- .-- .. ... .... . ...

About

A python module that creates a complete and balanced binary tree for morse code. By using that module you can decode or translate morse code string to its sentence.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages