

Discover more from EcZachly Data Engineering Newsletter
The hard truth about Data Engineering Data Structures and Algorithms interviews and how to pass them!
Data structures and algorithms interviews make some data engineers scream and others cry. Although there are a rare few who smile when barraged with a list of difficult questions pulled from Leetcode. In this newsletter, I’m not trying to turn you into a masochist who LOVES these types of interviews; I’m trying my best to minimize the fear and uncertainty around them instead!
The difficult reality of data structures and algorithms rounds
If you do enough of these interviews, you will fail this round for reasons that you think are bullshit. I’ve interviewed over the last 10 years at Facebook, Google, Netflix, Airbnb, Uber, Robinhood, and many more startups as well.
I’ve failed rounds at Uber, Robinhood, Google, and a few startups.
Some common threads between the rounds I failed and the rounds I passed.
Failed Interviews
I slept poorly the night before, mostly due to interview anxiety
I got myopically focused on solving the problem and didn’t ask enough clarifying questions at the beginning. I burnt myself with debugging time.
I got quiet and started coding in silence. Not talking out my thought process.
The interviewer wasn’t good at providing clarifying details about the problem and didn’t like having a conversation with me
The interviewer was looking for a very specific optimization or answer that I couldn’t summon
The interviewer was late to the interview and I lost 10-15 minutes of time
Passed Interviews
The interviewer and I both liked each other instantly and I felt a positive energy immediately before any question was asked
I prioritized clarification and communication with the interviewer
I went back to the fundamentals of knowing the right data structures to use and remembering the space/time tradeoff
I had 10-15 minutes at the tail end of the interview to crack jokes with the interviewer
One of the things you might notice about the common threads is only about half of them are related to me at all. The interviewer can ruin your interview regardless of how strong of an engineer you are! One of the things that I want to stress with these interviews is that there is a certain amount of luck involved with them. You can improve your fundamentals both in terms of communication and technical skills.
How to prepare for these interviews
The meme advice to pass these interviews is to “grind Leetcode” while there is truth to this advice around getting enough reps in, this advice lacks nuance.
If you truly want to effectively “grind Leetcode,” you need a learning structure that will keep you motivated. Here are some critical aspects that I do for the learning structure
Pick a doable number of problems that you can solve in a given day. For me, that number was five. Commit to solving five regardless of how much time it takes. For me, it meant I was “leetcoding” somewhere between thirty minutes and two hours each day. Treat this as a daily non-negotiable like going to the gym!
Time box this preparation time by getting interviews lined up. Depending on how strong your fundamentals are, you will need somewhere between one and three months to truly feel prepared.
A few days before the interview, stop grinding so hard. I’ve found if I keep grinding up until the interview, I have more anxiety on the day of the interview and it makes me perform worse.
Day of interview advice
The day of the interview make sure to get a good night’s sleep. Not operating on 100% sleep is my number one reason for failing these interviews!
Other things that I make sure to do:
Go for a short 10-15 minute run before the interview to minimize anxiety
Ask questions to the interviewer and treat them like a person. Getting the interviewer to laugh one time during the interview is one of my other goals since DSA interviews are normally so serious!
Make sure to use Python or JavaScript for your coding language. I used Java in my Facebook coding interview back in 2016 and almost failed because Java is so verbose!
Remember to think about optimizations. The space/time tradeoff is a critical thing to know about when optimizing your algorithms!
Remember that Big O notation applies to both space and time!
If you use an array to store all the values, that is O(n) in terms of space complexity!
Think through each problem and try to map the language of the problem to a data structure. Mastering English to data structure mapping will make you much more efficient at solving these data structures.
“balanced” usually means a stack
“ordinal” usually means a queue
“possible combinations” usually means a tree
How is the data engineering DSA interview different from the software engineering DSA interview?
I’ve interviewed for both software and data engineering roles in big tech over the years and here are the differences I’ve noticed.
Software engineering DSA rounds are:
More difficult. Almost always Leetcode hard questions are asked.
Push for more optimizations
Use things like “sorting in place” and “bit operations” a lot more, which I find so annoying
Binary search, breadth-first and depth-first search, and dynamic programming are common
Data engineering DSA rounds are:
More medium-level Leetcode questions
Focusing on stacks, queues, maps, trees, and recursion will get you through most of them
They care much more about the time complexity of the algorithms and less about the space complexity
The list of problems that I’ve encountered firsthand (at least that I can remember)
Airbnb
Facebook, Airbnb, Google
Facebook
Robinhood
Netflix
Conclusion
Everybody fails these interviews every now and again. One of the key things to remember is that there is a luck component to them! If you work on your fundamentals and communication skills, luck will be more on your side for sure!
What has been your experience with these coding interviews? Do you like them? Hate them? Drop a comment and let’s discuss more! Share this article with your friends who could benefit from it!
I’m launching a data engineering boot camp on November 6th which you can sign up for here. There is more in-depth content there on DSA interviews that you can access immediately after buying!
The hard truth about Data Engineering Data Structures and Algorithms interviews and how to pass them!
Hey Zach,
Awesome article. My experience with DSA interviews have not gone well. I struggled in understanding the methods that one can take towards producing a solution. I assumed that combining all the methods will generate an elegant solution. But I should approach it separately similar to a Math problem. Identify what steps are needed for a solution, select a method that can provide a solution, design the algorithm, & test it. I definitely like your approach and will apply it to my studies. Thanks!
It is okay to fail in an interview. Normalising this is the most required.
Thanks for a great article, Zach