• I Cast Fist@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    I never realized morse code was organized as a binary tree, this makes it much faster to figure out which letter the code meant

    • Deconceptualist@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      9 months ago

      I think if you take any set of symbols and map each one to a unique binary sequence, you can then structure it as a binary tree.

      In other words Morse didn’t have to be designed as a tree. The tree is just a data structure that fits any similar abstraction. You could probably do something similar with a multidimensional array (5D to include punctuation) but that’s much harder to illustrate.