About the book
Grokking Algorithms by Aditya Y. Bhargava introduces algorithms and data structures through illustrations, practical examples, and exercises. Rather than presenting concepts all at once, the book develops them gradually and connects new ideas to familiar situations.
This page introduces the second edition, published by Manning in 2024. The book is written in English, and its code examples use Python 3.
Topics covered
The book begins with binary search and Big O notation before introducing arrays, linked lists, selection sort, recursion, and the call stack. It then explores divide and conquer, quicksort, and hash tables.
Later chapters cover graphs, breadth-first search, trees, balanced trees, and Dijkstra’s algorithm. The discussion of trees includes depth-first traversal, Huffman coding, AVL trees, splay trees, and B-trees.
The final chapters introduce greedy algorithms, dynamic programming, and k-nearest neighbors. Examples include the knapsack problem, string comparison, classification, and recommendation systems. A concluding chapter suggests topics for further study.
Intended readers
The book is aimed at readers who already know the basics of programming and want to understand algorithms. Its intended audience includes self-taught programmers, coding boot camp students, and graduates looking to review fundamental concepts.
For a more active learning experience, follow the chapter sequence, run the examples, and complete the exercises.
Edition details
Author: Aditya Y. Bhargava
Publisher: Manning Publications
Publication year: 2024
Edition: Second
Book language: English
Code examples: Python 3