## Open Data Structures (in C++)

### BibTeX

@MISC{Morin_opendata,

author = {Pat Morin},

title = {Open Data Structures (in C++)},

year = {}

}

### OpenURL

### Abstract

I am grateful to Nima Hoda, who spent a summer tirelessly proofreading many of the chapters in this book, and to the students in the Fall 2011 offering of COMP2402/2002, who put up with the first draft of this book and spotted many typographic, grammatical, and factual errors in the first draft. i Preface to the C++ Edition This book is intended to teach the design and analysis of basic data structures and their implementation in an object-oriented language. In this edition, the language happens to be C++. This book is not intended to act as an introduction to the C++ programming language. Readers of this book need only be familiar with the basic syntax of C++ and similar languages. Those wishing to work with the accompanying source code should have some experience programming in C++. This book is also not intended as an introduction to the C++ Standard Template Library or the generic programming paradigm that the STL embodies. This book describes implementations of several different data structures, many of which are used in implementations

### Citations

155 |
Algorithm 232: Heapsort
- Williams
- 1964
(Show Context)
Citation Context ...as an array, or list, seems to have been first proposed by Eytzinger [22], as a representation for pedigree family trees. The BinaryHeap data structure described here was first introduced by Williams =-=[64]-=-. The randomized MeldableHeap data structure described here appears to have first been proposed by Gambin and Malinowski [29]. Other meldable heap implementations exist, including leftist heaps [12, 4... |

142 | Randomized search trees
- Aragon, Seidel
- 1989
(Show Context)
Citation Context ...e α ≈ 4.31107 is the unique solution on [2,∞) of the equation α ln((2e/α)) = 1 and 3 β = . Furthermore, the variance of the height is constant. 2ln(α/2) The name Treap was coined by Aragon and Seidel =-=[57]-=- who discussed Treaps and some of their variants. However, their basic structure was studied much earlier by Vuillemin [62] who called them Cartesian trees. One space-optimization of the Treap data st... |

98 |
A Unifying Look at Data Structures
- VUILLEMIN
- 1980
(Show Context)
Citation Context ... height is constant. 2ln(α/2) The name Treap was coined by Aragon and Seidel [57] who discussed Treaps and some of their variants. However, their basic structure was studied much earlier by Vuillemin =-=[62]-=- who called them Cartesian trees. One space-optimization of the Treap data structure that is sometimes performed is the elimination of the explicit storage of the priority p in each node. Instead, the... |

88 | A data structure for manipulating priority queues
- Vuillemin
- 1978
(Show Context)
Citation Context ... structure described here appears to have first been proposed by Gambin and Malinowski [29]. Other meldable heap implementations exist, including leftist heaps [12, 41, Section 5.3.2], binomial heaps =-=[61]-=-, Fibonacci heaps [27], pairing heaps [26], and skew heaps [60], although none of these are as simple as the MeldableHeap structure. Some of the above structures also support a decreaseKey(u,y) operat... |

86 |
Log-logarithmic worst-case range queries are possible in space theta(n
- Willard
- 1983
(Show Context)
Citation Context ...ussion and Exercises stratified) tree. The original van Emde Boas structure had size 2w , so was impractical for large integers. The XFastTrie and YFastTrie data structures were discovered by Willard =-=[63]-=-. The XFastTrie structure is very closely related to van Emde Boas trees. One view of this is that the hash tables in an XFastTrie replace arrays in a van Emde Boas tree. That is, instead of storing t... |

39 |
og Tarjan. Self-adjusting binary trees
- Sleator, D
- 1983
(Show Context)
Citation Context ...y Gambin and Malinowski [29]. Other meldable heap implementations exist, including leftist heaps [12, 41, Section 5.3.2], binomial heaps [61], Fibonacci heaps [27], pairing heaps [26], and skew heaps =-=[60]-=-, although none of these are as simple as the MeldableHeap structure. Some of the above structures also support a decreaseKey(u,y) operation in which the value stored at node u is decreased to y. (It ... |

22 | Balanced search trees made simple
- Andersson
- 1993
(Show Context)
Citation Context ...implementation complexity they are found in some of the most commonly used libraries and applications. Most algorithms and data structures textbooks discuss some variant of red-black trees. Andersson =-=[5]-=- describes a left-leaning version of balanced trees that are similar to red-blacktreesbuthavetheadditionalconstraintthatanynodehasatmostoneredchild. Thisimpliesthatthesetreessimulate2-3treesratherthan... |

21 | Improving partial rebuilding by using simple balance criteria
- Andersson
- 1989
(Show Context)
Citation Context ...ebuild(u). 8.2 Discussion and Exercises The term scapegoat tree is due to Galperin and Rivest [30], who define and analyze these trees. However, the same structure was discovered earlier by Andersson =-=[4, 6]-=-, who called them general balanced trees since they can have any shape as long as their height is small.Experimenting with the ScapegoatTree implementation will reveal that it is often considerably s... |

20 | General Balanced Trees
- Andersson
- 1999
(Show Context)
Citation Context ...ebuild(u). 8.2 Discussion and Exercises The term scapegoat tree is due to Galperin and Rivest [30], who define and analyze these trees. However, the same structure was discovered earlier by Andersson =-=[4, 6]-=-, who called them general balanced trees since they can have any shape as long as their height is small.Experimenting with the ScapegoatTree implementation will reveal that it is often considerably s... |

12 | Biased skip lists
- Bagchi, Buchsbaum, et al.
- 2005
(Show Context)
Citation Context ...ely. Several researchers have doneverypreciseanalysisoftheexpectedlengthandvarianceinlengthofthesearchpath for the ith element in a skiplist [40, 39, 51]. Deterministic versions [48], biased versions =-=[7, 23]-=-, and self-adjusting versions [10] of skiplists have all been developed. Skiplist implementations have been written for various languages and frameworks and have seen use in open-source database syste... |

8 | Information sorting in the application of electronic digital computers to business operations - Seward - 1954 |

3 |
Available from: http://dekorte.com/projects/ opensource/SkipDB/ [cited
- SkipDB
(Show Context)
Citation Context ...and self-adjusting versions [9] of skiplists have all been developed. Skiplist implementations have been written for various languages and frameworks and have seen use in open-source database systems =-=[59, 53]-=-. A variant of skiplists is used in the HP-UX operating system kernel’s process management structures [36]. Exercise 4.1. Show that, during an add(x) or a remove(x) operation, the expected number of p... |

2 |
eBooks by Project Gutenberg. Available from: http://www.gutenberg.org
- Free
(Show Context)
Citation Context ...size(); return x; Finally,theresize()operationisverysimilartotheresize()operationofArrayStack. It allocates a new arraybof size 2n and copies a[j],a[(j+1)%a.length],...,a[(j+n−1)%a.length] onto b[0],b=-=[1]-=-,...,b[n−1] and setsj=0. void resize() { array<T> b(max(1, 2 * n)); for (int k = 0; k < n; k++) b[k] = a[(j+k)%a.length]; a = b; } ArrayQueue 2.3.1 Summary The following theorem summarizes the perform... |