Beware of bugs in the above code; I have only proved it correct, not tried it.
Post date: Oct 27, 2013 5:20:25 PM
-- Donald E. Knuth, "Notes on the van Emde Boas construction of priority deques: An instructive use of recursion" (five-page memo sent to Peter van Emde Boas, Robert Tarjan, and John Hopcroft), March 22, 1977