Acknowledgments |
|
xvii | |
Introduction |
|
xix | |
Intended Audience |
|
xx | |
Language-Agnostic |
|
xxi | |
On Analogies and Brewing Coffee |
|
xxi | |
How to Use This Book |
|
xxii | |
|
|
1 | (12) |
|
|
2 | (1) |
|
Composite Data Structures |
|
|
3 | (2) |
|
|
5 | (5) |
|
|
8 | (2) |
|
|
10 | (1) |
|
|
11 | (2) |
|
|
13 | (12) |
|
|
14 | (1) |
|
|
14 | (2) |
|
|
16 | (4) |
|
|
18 | (2) |
|
Implementing Binary Search |
|
|
20 | (1) |
|
|
20 | (2) |
|
|
22 | (1) |
|
|
23 | (2) |
|
3 Dynamic Data Structures |
|
|
25 | (18) |
|
The Limitations of Arrays |
|
|
26 | (3) |
|
|
29 | (1) |
|
|
30 | (3) |
|
Operations on Linked Lists |
|
|
33 | (6) |
|
Inserting into a Linked List |
|
|
34 | (3) |
|
Deleting from a Linked List |
|
|
37 | (2) |
|
|
39 | (1) |
|
Arrays and Linked Lists of Items |
|
|
39 | (1) |
|
|
40 | (3) |
|
|
43 | (12) |
|
|
44 | (3) |
|
|
44 | (2) |
|
|
46 | (1) |
|
|
47 | (3) |
|
|
47 | (2) |
|
|
49 | (1) |
|
|
50 | (4) |
|
|
51 | (1) |
|
|
52 | (2) |
|
|
54 | (1) |
|
|
55 | (1) |
|
Binary Search Tree Structure |
|
|
56 | (2) |
|
Searching Binary Search Trees |
|
|
58 | (1) |
|
Iterative and Recursive Searches |
|
|
59 | (3) |
|
Searching Trees vs. Searching Sorted Arrays |
|
|
62 | (1) |
|
Modifying Binary Search Trees |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
65 | (6) |
|
The Danger of Unbalanced Trees |
|
|
71 | (1) |
|
Bulk Construction of Binary Search Trees |
|
|
72 | (1) |
|
|
73 | (2) |
|
6 Tries And Adapting Data Structures |
|
|
75 | (18) |
|
Binary Search Trees of Strings |
|
|
76 | (2) |
|
|
70 | (7) |
|
The Cost of String Comparison |
|
|
77 | (1) |
|
|
78 | (12) |
|
|
81 | (4) |
|
Adding and Removing Nodes |
|
|
85 | (5) |
|
|
90 | (3) |
|
7 Priority Queues And Heaps |
|
|
93 | (20) |
|
|
94 | (2) |
|
|
96 | (9) |
|
Adding Elements to a Heap |
|
|
98 | (3) |
|
Removing the Highest-Priority Elements from Heaps |
|
|
101 | (3) |
|
Storing Auxiliary Information |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
106 | (2) |
|
|
108 | (3) |
|
|
111 | (2) |
|
|
113 | (1) |
|
Introducing Nearest-Neighbor Search |
|
|
114 | (5) |
|
Nearest-Neighbor Search with Linear Scan |
|
|
114 | (5) |
|
|
119 | (1) |
|
|
119 | (5) |
|
|
120 | (2) |
|
Building Grids and Inserting Points |
|
|
122 | (1) |
|
|
122 | (2) |
|
|
124 | (10) |
|
|
124 | (3) |
|
|
127 | (1) |
|
Ideal Expanding Search over Bins |
|
|
128 | (2) |
|
Simplified Expanding Search |
|
|
130 | (4) |
|
The Importance of Grid Size |
|
|
134 | (1) |
|
|
135 | (3) |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
140 | (3) |
|
Building Uniform Quadtrees |
|
|
143 | (2) |
|
|
145 | (2) |
|
|
147 | (3) |
|
Searching Uniform QuadTrees |
|
|
150 | (7) |
|
Nearest-Neighbor Search Code |
|
|
157 | (1) |
|
|
158 | (1) |
|
|
159 | (4) |
|
|
163 | (2) |
|
|
165 | (2) |
|
|
168 | (2) |
|
|
170 | (1) |
|
|
171 | (1) |
|
Storage and Search with Keys |
|
|
172 | (2) |
|
|
174 | (2) |
|
|
176 | (2) |
|
|
178 | (1) |
|
|
179 | (4) |
|
|
183 | (2) |
|
Handling Non-numeric Keys |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
185 | (2) |
|
|
187 | (12) |
|
|
188 | (2) |
|
|
190 | (5) |
|
|
190 | (3) |
|
Updating an Element's Recency |
|
|
193 | (2) |
|
Other Eviction Strategies |
|
|
195 | (1) |
|
|
196 | (3) |
|
|
199 | (26) |
|
|
200 | (3) |
|
|
203 | (2) |
|
|
205 | (7) |
|
|
205 | (5) |
|
|
210 | (2) |
|
|
212 | (10) |
|
|
212 | (5) |
|
Finding the Minimum Value Key |
|
|
217 | (1) |
|
|
217 | (2) |
|
Examples of Removing Keys |
|
|
219 | (3) |
|
|
222 | (3) |
|
|
225 | (10) |
|
Introducing Bloom Filters |
|
|
226 | (6) |
|
Hash Tables of Indicators |
|
|
227 | (1) |
|
|
228 | (3) |
|
|
231 | (1) |
|
Tuning Bloom Filter Parameters |
|
|
232 | (1) |
|
Bloom Filters vs. Hash Tables |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
235 | (12) |
|
Randomized vs. Deterministic Structures |
|
|
236 | (1) |
|
|
237 | (7) |
|
|
239 | (2) |
|
|
241 | (2) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
245 | (2) |
|
|
247 | (18) |
|
|
248 | (4) |
|
|
249 | (2) |
|
|
251 | (1) |
|
Finding Shortest Paths with Dijkstra's Algorithm |
|
|
252 | (4) |
|
Finding Minimum Spanning Trees with Prim's Algorithm |
|
|
256 | (4) |
|
Topological Sort with Kahn's Algorithm |
|
|
260 | (3) |
|
|
263 | (2) |
|
|
265 | (6) |
|
What Is the Impact of the Data's Structure? |
|
|
266 | (1) |
|
Do We Need Dynamic Data Structures? |
|
|
266 | (1) |
|
What Is the Amortized Cost? |
|
|
267 | (1) |
|
How Can We Adapt Data Structures to a Specific Problem? |
|
|
267 | (1) |
|
What Are the Memory vs. Runtime Tradeoffs? |
|
|
268 | (1) |
|
How Can We Tune Our Data Structure? |
|
|
268 | (1) |
|
How Does Randomization Impact Expected Behavior? |
|
|
269 | (1) |
|
|
269 | (2) |
Index |
|
271 | |