You can only flip in one direction, so the time taken to update is entirely dependent on the previous state. Worst case you'd need to display the previous character (B -> A for alphabetical order) and would have to flip through the entire alphabet to get to it.
> You can only flip in one direction, so the time taken to update is entirely dependent on the previous state. Worst case you'd need to display the previous character (B -> A for alphabetical order) and would have to flip through the entire alphabet to get to it.
This only applies if you have only one copy of each letter.
You can consider having more copies of frequent letters mixed into the stack, if the stack's thickness allows.
Wouldn't that only help with the average case, not the worst case? Either you have multiple copies of every character (in which case you're still flipping through the same number of characters as the original stack), or some characters don't have duplicates.
Suppose you are optimizing for the fastest average time to display a complete word/phrase. That means you will be limited by the slowest letter in each word. But the letters are flipping in parallel, which means you can use the time waiting for the slowest letter to move the other letters to an optimal display.
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.