## Open Data Structures (in Java)

### BibTeX

@MISC{Morin_opendata,

author = {Pat Morin},

title = {Open Data Structures (in Java)},

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 Why This Book? There are plenty of books that teach introductory data structures. Some of them are very good. Most of them cost money, and the vast majority of computer science undergraduate students will shell-out at least some cash on a data structures book. Thereareafewfreedatastructuresbooksavailableonline. Someareverygood,but most of them are getting old. The majority of these books became free when the author and/or publisher decided to stop updating them. Updating these books is usually not

### Citations

561 |
The Input/Output complexity of sorting and related problems
- Aggarwal, Vitter
- 1988
(Show Context)
Citation Context ... operations results in a total of O(Bm) time spent performing splits, merges, and borrows. 14.3 Discussion and Exercises The external memory model of computation was introduced by Aggarwal and Vitter =-=[4]-=-. It is sometimes also called the I/O model or the disk access model. B-Trees are to external memory searching what binary search trees are to internal memory searching. B-trees were introduced by Bay... |

154 |
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 =-=[66]-=-. 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
- Aragorn, Seidel
- 1989
(Show Context)
Citation Context ...ere α≈ 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 =-=[59]-=- who discussed Treaps and some of their variants. However, their basic structure was studied much earlier by Vuillemin [64] who called them Cartesian trees. Onespace-optimizationoftheTreapdatastructur... |

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 [59] who discussed Treaps and some of their variants. However, their basic structure was studied much earlier by Vuillemin =-=[64]-=- who called them Cartesian trees. Onespace-optimizationoftheTreapdatastructurethatissometimesperformedis theeliminationoftheexplicitstorageoftheprioritypineachnode. Instead,thepriorityof anode,u, isco... |

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 =-=[63]-=-, Fibonacci heaps [27], pairing heaps [26], and skew heaps [62], although none of these are as simple as the MeldableHeap structure. Some of the above structures also support a decreaseKey(u,y) operat... |

87 |
Log-logarithmic worst-case range queries are possible in space theta(n
- Willard
- 1983
(Show Context)
Citation Context ...he van Emde Boas (or 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 =-=[65]-=-. 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 |
TARIAN, Self-adjusting binary trees
- SLEATOR, E
- 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 [63], Fibonacci heaps [27], pairing heaps [26], and skew heaps =-=[62]-=-, 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 ... |

28 |
Probability models for computer science
- Ross
- 2002
(Show Context)
Citation Context ...sic probability, and lots more, see the textbook by Leyman, Leighton, and Meyer [43]. For more information on basic probability, especially as it relates to computer science, see the textbook by Ross =-=[57]-=-. Another good reference, that covers both asymptotic notation and probability, is the textbook by Graham, Knuth, and Patashnik [31]. Readers wanting to brush up on their Java programming can find man... |

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 =-=[6]-=- 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 [33], who define and analyze these trees. However, the same structure was discovered earlier by Andersson =-=[5, 7]-=-, 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 [33], who define and analyze these trees. However, the same structure was discovered earlier by Andersson =-=[5, 7]-=-, 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 [45, 44, 58]. Deterministic versions [53], biased versions =-=[8, 26]-=-, and self-adjusting versions [12] of skiplists have all been developed. Skiplist implementationshavebeenwrittenforvariouslanguagesandframeworksandhaveseenuse in open-source database systems [69, 63].... |

9 | 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 ...,21], andself-adjusting versions [9]ofskiplistshaveall been developed. Skiplistimplementations have been written for various languages and frameworks and have seen use in open-source database systems =-=[61, 55]-=-. A variant of skiplists is used in the HP-UX operating system kernel’s process management structures [36]. Skiplists are even part of the Java 1.6 API [47]. Exercise 4.1. Show that, during an add(x) ... |

2 |
eBooks by Project Gutenberg. Available from: http://www.gutenberg.org
- Free
(Show Context)
Citation Context ... x; } Finally, the resize() operation is very similar to the resize() operation of ArrayStack. 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. ArrayQueue void resize() { T[] b = newArray(Math.max(1,n * 2)); for (int k = 0; k < n; k++) b[k] = a[(j+k) % a.length]; a = b; j = 0; } 2.3.1 Summary The following theorem sum... |

1 |
Left-leaning red-black trees, September 2008. Available from: http: //www.cs.princeton.edu/˜rs/talks/LLRB/LLRB.pdf [cited
- Sedgewick
(Show Context)
Citation Context ...BlackTree structure presented in this chapter. 2See the proofs of Lemma 2.2 and Lemma 3.1 for other applications of the potential method. 1579. Red-Black Trees 9.4. Discussion and Exercises Sedgewick=-=[58]-=-describesatleasttwoversionsofleft-leaningred-blacktrees. These userecursionalongwithasimulationoftop-downsplittingandmergingin2-4trees. The combination of these two techniques makes for particularly s... |