(no title)
danohuiginn | 4 years ago
So have the alphabet ordered in descending frequency. But put a second block of the most common characters half-way through. For each word you first calculate the slowest letter, which gives you a 'budget' of how many flips you will take. Then each letter uses that budget to get to the optimal location of the character it needs to display, probably as early in the alphabet as possible.
If you know which word is being displayed _next_, you can also try to get into the best position to move to in preparation.
The ideal alphabet ordering might be different depending on position in the word -- for instance, some letters are more common at the start of a word. And you could think about digraphs, taking advantage of Q usually being followed by U.
No comments yet.