3 ms·
That's a prefix code, they're defined by no code word being a prefix of another (so if you put them in a trie the code words only appear on leaves). A trivial
by hcs 7y ago
That's a prefix code, they're defined by no code word being a prefix of another (so if you put them in a trie the code words only appear on leaves).
A trivial example is the reverse:
_.
_..
_...
Which can be decoded by, at worst, reversing the string first.
(Sorry if I've misunderstood your example)
- Someone 7y agoNo, you didn’t.