Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Interview and Exam-Level Data Structures Problems (With Full Solutions) (leanpub.com)
3 points by shhabmlkawy 40 days ago | hide | past | favorite | 1 comment
I’ve spent the last two years writing a collection of 130 original problems in Data Structures & Algorithms, each with fully worked-out solutions, proofs, and time complexity analysis.

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.



very rich book with detailed solution to questions that appear in job interviews and academic exams




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: