13:03
Algorithm question: I've got a finite, ordered set of labels at my disposal (A-Z, say). Now I've got a bunch of incoming ordered values, integers say (this is an online problem). The values are drawn from a known range, but with an unknown distribution. What strategy do I use to assign labels to these values, so that the order of label and value matches, and so that I don't run out of labels for as long as possible.
(Basically, if I've assigned M to the value 5 at some point, and N to the value 7 at some point, and now a 6 comes in, I've lost because there's no label left between M and N. This situation should be delayed for as long as possible.)
Is it even possible to do better than assume a uniform distribution for the subinterval I have to insert the value into?
And how does this change if a) I receive a small number of values at once or b) I don't know what range the inputs are drawn from (or I know that they are drawn from (-inf, inf).
This seems like it should be a well-studied problem, but I don't even know where to begin searching.