Skip to content
Hello Algo
简体中文
繁體中文
English
日本語
Русский
한국어
Search
krahets/hello-algo
Hello Algo
krahets/hello-algo
Foreword
Foreword
Chapter 0. Preface
Chapter 0. Preface
0.1 About this book
0.2 How to use this book
0.3 Summary
Chapter 1. Getting to know algorithms
Chapter 1. Getting to know algorithms
1.1 Algorithms are everywhere
1.2 What is an algorithm?
1.3 Summary
Chapter 2. Complexity analysis
Chapter 2. Complexity analysis
2.1 Evaluating algorithm efficiency
2.2 Iteration and recursion
2.3 Time complexity
2.4 Space complexity
2.5 Summary
2.6 Exercises
Chapter 3. Data structures
Chapter 3. Data structures
3.1 Classifying data structures
3.2 Basic data types
3.3 Number encoding *
3.4 Character encoding *
3.5 Summary
3.6 Exercises
Chapter 4. Arrays and linked lists
Chapter 4. Arrays and linked lists
4.1 Arrays
4.2 Linked lists
4.3 Lists
4.4 Memory and cache *
4.5 Summary
4.6 Exercises
Chapter 5. Stacks and queues
Chapter 5. Stacks and queues
5.1 Stacks
5.2 Queues
5.3 Deques
5.4 Summary
5.5 Exercises
Chapter 6. Hash tables
Chapter 6. Hash tables
6.1 Hash tables
6.2 Hash collisions
6.3 Hash algorithms
6.4 Summary
6.5 Exercises
Chapter 7. Trees
Chapter 7. Trees
7.1 Binary trees
7.2 Traversing a binary tree
7.3 Array representation of a binary tree
7.4 Binary search trees
7.5 AVL trees *
7.6 Summary
7.7 Exercises
Chapter 8. Heaps
Chapter 8. Heaps
8.1 Heaps
8.2 Building a heap
8.3 The top-k problem
8.4 Summary
8.5 Exercises
Chapter 9. Graphs
Chapter 9. Graphs
9.1 Graphs
9.2 Basic graph operations
9.3 Graph traversal
9.4 Summary
9.5 Exercises
Chapter 10. Searching
Chapter 10. Searching
10.1 Binary search
10.2 Finding an insertion point with binary search
10.3 Finding boundaries with binary search
10.4 Optimizing with hashing
10.5 Search algorithms revisited
10.6 Summary
10.7 Exercises
Chapter 11. Sorting
Chapter 11. Sorting
11.1 Sorting algorithms
11.2 Selection sort
11.3 Bubble sort
11.4 Insertion sort
11.5 Quick sort
11.6 Merge sort
11.7 Heap sort
11.8 Bucket sort
11.9 Counting sort
11.10 Radix sort
11.11 Summary
11.12 Exercises
Chapter 12. Divide and conquer
Chapter 12. Divide and conquer
12.1 Divide and conquer
12.2 Divide-and-conquer search
12.3 Building a binary tree
12.4 Tower of Hanoi
12.5 Summary
12.6 Exercises
Chapter 13. Backtracking
Chapter 13. Backtracking
13.1 Backtracking algorithms
13.2 Permutations problem
13.3 Subset sum problem
13.4 N-queens problem
13.5 Summary
13.6 Exercises
Chapter 14. Dynamic programming
Chapter 14. Dynamic programming
14.1 Introduction to dynamic programming
14.2 Properties of dynamic programming problems
14.3 Solving dynamic programming problems
14.4 0-1 knapsack problem
14.5 Unbounded knapsack problem
14.6 Edit distance problem
14.7 Summary
14.8 Exercises
Chapter 15. Greedy algorithms
Chapter 15. Greedy algorithms
15.1 Greedy algorithms
15.2 Fractional knapsack problem
15.3 Maximum capacity problem
15.4 Maximum product cutting problem
15.5 Summary
15.6 Exercises
Chapter 16. Appendix
Chapter 16. Appendix
16.1 Setting up a programming environment
16.2 Contribute to the book
16.3 Glossary
References
References
404 - Page not found