Pat Morin · Edition 0.1G
Open Data Structures (in Java)
Pat Morin’s textbook on data structures, with Java implementations, time and space analysis, proofs, examples and exercises. Its fourteen chapters cover lists, hash tables, search trees, heaps, sorting, graphs and external-memory searching.
Complete English book: Edition 0.1G, 334 pages. The PDF contains a linked contents page and index. The LaTeX and source ZIP provide the editable text, code and figures.
Before you start
Bring basic programming experience with arrays, loops, methods, classes, references and recursion. The implementations use Java. Chapter 1 introduces asymptotic notation, probability and the computation model.
B10 — Discrete Mathematics supplies preparation in reasoning and proof. B80 — Mathematical Computing supplies programming and reproducible-experiment practice in Python and SageMath; it is not an introductory Java course.
Follow the author’s chapter order; Section 1.7 explains the chapter dependencies. This book supplies a data-structures foundation, not a complete general algorithms course.
Chapters and exercises
- Chapter 1
Introduction
- Chapter 2
Array-Based Lists
- Chapter 3
Linked Lists
- Chapter 4
Skiplists
- Chapter 5
Hash Tables
- Chapter 6
Binary Trees
- Chapter 7
Random Binary Search Trees
- Chapter 8
Scapegoat Trees
- Chapter 9
Red-Black Trees
- Chapter 10
Heaps
- Chapter 11
Sorting Algorithms
- Chapter 12
Graphs
- Chapter 13
Data Structures for Integers
- Chapter 14
External Memory Searching
For educators
Each chapter has discussion and exercises. Combine reading the arguments with implementing operations, testing boundary cases and comparing measured performance with the complexity bounds. The author’s Java code is in the source ZIP. A complete solutions manual is not included.
Author, sources and licence
Mathematical text and accompanying book code: Pat Morin. Licence: Creative Commons Attribution 2.5 Canada. Author’s original book page · LaTeX and code source.
Source assembly, typesetting and programme navigation: OpenAI Codex — GPT-6.1 Sol, Ultra effort.