A Common-Sense Guide to Data Structures and Algorithms – Part 1

Our book club is taking a hiatus from technical leadership books to delve into programming-related topics. We’re reading A Common-Sense Guide to Data Structures and Algorithms, 2nd ed. by Jay Wengrow (link).

Some of us learned data structures and algorithms through computer science education, and some of us have learned bits and pieces along the way. It’s been over a decade since I’ve personally reviewed data structures and algorithms, so I’m looking forward to revisiting them.

Given this topic involves some coding, I’m curious how our weekly sessions will turn out. I’m excited to see what we learn together!

This week, we discussed Chapter 1 (Why Data Structures Matter).


  • This first chapter covers arrays and sets.
  • “…when we measure how ‘fast’ an operation takes, we do not refer to how fast the operation takes in terms of pure time, but instead in how many steps it takes. … Measuring the speed of an operation in terms of time is undependable, since the time will always change depending on the hardware it is run on.” Jamie liked this approach; you see the same code perform differently depending on the runtime (e.g., just-in-time compilation of any interpreted language, garbage collection).
  • Geoff doesn’t believe the two-dimensional diagram of how memory works in a computer was helpful; the latter linear diagrams were more accurate.
  • If you’ve heard of CRUD (create, read, update, delete), the verbs for data structures — read, insert, search, delete — should sound familiar.
  • On deleting an element from an array… Instead of removing and shifting left, you can also mark a cell as deleted; that could incur other complexities such as knowing how to handle deleted cells when reading, inserting, searching, or deleting.
  • On inserting into sets… Geoff is sure the author will address this later (as the preface said the book would start simple, even if not entirely accurate, so that people can understand), but you can get around the 2N+1 performance by having the array-set sorted.
  • Jamie said he’s likely to find this book helpful. It reminded him that most of his data structure work leans toward optimizing for read performance.
  • Given the introductory nature of the chapter, how far along the three of us (Houston, Jamie, and Geoff) are in our careers, and that Jameson and Dennis couldn’t attend, we spent a fair amount of time talking about operating systems and editors. For example, Jamie uses Visual Studio Code for developing in Python. (Relevance: Many of the code examples in the book are written in Python.)