Description
A concise introduction to data structures and algorithms in Ruby. Data structures are presented in a container hierarchy that includes stacks and queues as non-traversable dispensers, and lists, sets, and maps as traversable collections. Algorithm analysis is introduced and applied to linear and binary search, bubble sort, selection sort, insertion sort, merge sort and quicksort. The book also covers heaps and heapsort, unbalanced binary search trees, AVL trees, 2-3 trees, hashing, graph representations, and graph algorithms based on depth-and breadth-first search.
Content
- Introduction
- Built-In Types
- Containers
- Assertions
- Stacks
- Queues
- Stacks and Recursion
- Collections and Iterators
- Lists
- Analyzing Algorithms
- Function Growth Rates
- Basic Sorting Algorithms
- Recurrences
- Merge Sort and Quicksort
- Trees, Heaps, and Heapsort
- Binary Trees
- Binary Search and Binary Search Trees
- AVL Trees
- 2–3 Trees
- Sets
- Maps
- Hashing
- Hashed Collections
- Graphs
- Graph Algorithms