
Perełki oprogramowania
Seria Klasyka informatyki
Author: Jon Bentley
I’ve read few books about algorithms, but this one was my favorite. It’s not a handbook/manual style, where you have all algorithms explained - it’s rather a feast for though.
From this book I learned principles like: “divide and conquer” (or how I prefer it: whatever you can, divide by two 😄). It might not be that obvious at first, but practical use cases are unlimited. My personal favorite is hanging the curtains: you start at edges, then in the middle, then you divide again and again until you have them perfectly symmetric. Of course, the most common use case are sorting algorithms, but even with those understanding why Quick Sort is not the best one, and Heap Sort wins competition allowed me to surprise many people from DBAs to Senior Software Engineers - they didn’t know!
I remember one more “pearl”, with binary map as a way to track execution of complex task and a quick check what you’ve already done. I used it in a real complex task. I needed almost 30GB of RAM, but was able to prove that all cases were checked.