The goal was to create something that feels like a mix between a university-level exam set and an MIT-style lecture note, but with complete, step-by-step answers. Many of the problems involve new ideas that don’t appear in standard textbooks, including some heap variants I designed (Triple-L Heap and Layered Summary Heap).
Topics covered include: • Heaps, priority queues, and advanced heap structures • Union-Find (with potential function analyses) • Trees and balanced trees (AVL, Splay, etc.) • RMQ, suffix arrays, hashing, and more • Sorting, prefix/suffix techniques • Dynamic sequences and amortized analysis • 130 questions with 2–3 subparts each + full solutions
Example problem style: “Given an array A of size n, split it into two disjoint subsets such that the absolute difference of sums is minimized — without using DP or exponential search.” (The solution uses a prefix–suffix argument and runs in O(n).)
Happy to hear feedback, suggestions, or ideas for a second edition. If anyone wants to see the full book, here is the link in the URL field above.
shhabmlkawy•1h ago