Insights from an ex-Googler who has taught 1000s of Engineers about DSA interviews

Insights from an ex-Googler who has taught 1000s of Engineers about DSA interviews

I interviewed Alvin Zablan, an ex-Google engineer who has taught thousands of people about data structures and algorithms. He's seen countless engineers pass and fail interviews at top tech companies, so his insights can make a big difference in your preparation.

The first thing Alvin recommended is that you need a learning roadmap. Many engineers start doing random problems without a direction or an understanding of underlying patterns. There's an infinite universe of possible DSA questions, so it's crucial to categorize the problems you're asked.

Within each category, ensure you have a deep understanding of various techniques. Alvin recommends starting with the basics like strings, arrays, and basic HashMap problems. These rarely give people a hard time, but you should master them before moving on.

After that, here are the 5 core concepts that will give you excellent coverage of many DSA problems:

  1. Depth-First Search (DFS): The first building block of graph traversal.
  2. Breadth-First Search (BFS): The second building block of graph traversal.
  3. Dynamic Programming: Break down complex problems into simpler subproblems.
  4. Recursive Backtracking: Explore multiple solutions and backtrack when needed.
  5. Two Pointer: Efficiently iterate through arrays or linked lists.

One of the biggest things Alvin stressed is to focus on mastery of these concepts. The philosophy you should adopt is the 80/20 rule, where 20% of the input will give you 80% of the output. That means for these 20% most common ideas, you should go very deep.

Be able to explain the solution in detail, identify alternate solutions, and explain what bugs would emerge with simple changes to the algorithm. If you do this, not only will you be much better prepared for interviews, but you'll also have tons of confidence for anything new you might see.

A few other key takeaways:

  • Learning comes before practice: Leetcode is for practicing your DSA skills, not for learning them. Learning happens if you can read or watch a detailed explanation. You should feel empowered to watch and re-watch tutorials until you truly 'get it.'
  • Practice mindfully: Solve problems to solidify your understanding, not just for the sake of solving them. Instead of giving up on a problem after a few minutes of struggle, give yourself a hint by watching the first 30 seconds of the solution and then struggling more.

Happy to answer questions or share my own perspective as a Staff Engineer in Big Tech in the comments 😄

Crash Course: Beginner Data Structures And Algorithms Concepts - Taro Course
Tired of the frustrating LeetCode grind? The reason people struggle with learning data structures and algorithms (DSA) is that they go about it in the completely wrong way

Connect with Alvin on LinkedIn.

Alvin made his 10-hour crash course about Data Structures and Algorithms: https://www.jointaro.com/course/crash-course-data-structures-and-algorithms-concepts/

Best,

Rahul