|
ADS
Algorithms and Data Structures
|
The rootish array stack of Brodnik, Carlsson, Demaine, Munro and Sedgewick, beyond the book. More...
Files | |
| file | ADS/sequence/RootishArrayStack.h |
| The rootish array stack of Brodnik, Carlsson, Demaine, Munro and Sedgewick, beyond the book: a LIST by rank, operator[], insert( i , x ) and erase( i ) (section 2.6 of Morin's book), whose items lie in \( r \) blocks of \( 1 , 2 , \ldots , r \) places, so that a vector that grows never copies its items and wastes only \( O( \sqrt{n} ) \) places, where a vector that doubles [see ArraySequence.h] wastes up to \( 2 n \) of them and copies each item once on average. | |
Classes | |
| class | ADS::RootishArrayStack< T, A > |
| a LIST by rank on blocks of \( 1 , 2 , \ldots , r \) places, with \( O( \sqrt{n} ) \) places wasted More... | |
The rootish array stack of Brodnik, Carlsson, Demaine, Munro and Sedgewick, beyond the book.
The definitions, the invariants and the costs of the area are in Theory of sequences and lists.