A method used behind the scenes to provide O(1)-amortized time for most operations. Runs in O(n) time worst case; restructures the rdeque so that the two internal rstacks are roughly the same length.
The rdeque to fix.
additional arguments to be passed to or from methods.
a fixed deque.
Okasaki, Chris. Purely Functional Data Structures. Cambridge University Press, 1999.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.