Grokking Algorhithms

Grokking Algorhithms

Aditya Bhargava

📅 Finished on: 2023-11-09

💻 IT
⭐⭐⭐

Think in Big O, something that changes by a few seconds can scale very badly

Recommended by Fabio Biondi on Gitbar for learning algorithms easily, “masterpiece”. A very good read indeed, it starts very slowly with binary search and Big O notation and finishes with KNN, regression, distance matrices, and more advanced topics.

I appreciated the thorough explanation of Big O (maybe too much) and of binary search, arrays vs linked lists, and binary trees. It finally gave me a simple framework to understand how it works, but toward the end I felt it was a bit rushed, with the ML section feeling tacked on and the trees only sketched. The part on the traveler’s dilemma is solid. Also, having code in Python is a plus.

I would say the takeaway is

  • Always think in Big O. Something that differs by a few seconds in development, when run over billions of rows, can take months. Think about how to optimize
  • Don’t build algorithms by reinventing the wheel