xvi
about this book
•
Chapter 2
—You’ll learn about two fundamental data structures:
arrays and linked lists. These data structures are used throughout the
book, and they’re used to make more advanced data structures like
hash tables (chapter 5).
•
Chapter 3
—You’ll learn about recursion, a handy technique used by
many algorithms (such as quicksort, covered in chapter 4).
In my experience, Big O notation and recursion are challenging topics
for beginners. So I’ve slowed down and spent extra time on these
sections.
The rest of the book presents algorithms with broad applications:
•
Problem-solving techniques
—Covered in chapters 4, 8, and 9. If you
come across a problem and aren’t sure how to solve it efficiently, try
divide and conquer (chapter 4) or dynamic programming (chapter
9). Or you may realize there’s no efficient solution, and get an
approximate answer using a greedy algorithm instead (chapter 8).
•
Hash tables
—Covered in chapter 5. A hash table is a very useful data
structure. It contains sets of key and value pairs, like a person’s name
and their email address, or a username and the associated password.
It’s hard to overstate hash tables’ usefulness. When I want to solve
a problem, the two plans of attack I start with are “Can I use a hash
table?” and “Can I model this as a graph?”
•
Dostları ilə paylaş: