Algorithms interviews: theory vs. practice
When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down" 1 . One thing I find funny about this is, even though a decent fraction of the value I've provided for companies has been solving phone-screen level algorithms problems on the job, I can't pass algorithms interviews! When I say that, people often think I mean that I fail half my interviews or something. It's more than half. When I wrote a draft blog post of my interview experiences, draft readers panned it as too boring and repetitive because I'd failed too many interviews. I should summarize my failures as a table because no one's going to want to read a 10k word blog post that's just a series of failures, they said (which is good advice; I'm working on a version with a table). I’ve done maybe 40-ish "real" software interviews and passed maybe one or two of them (arguably zero) 2 . Let's look at a few examples to make it clear what I mean by "phone-screen level algorithms problem", above. At one big company I worked for, a team wrote a core library that implemented a resizable array for its own purposes. On each resize that overflowed the array's backing store, the implementation added a constant number of elements and then copied the

Algorithms interviews: theory vs. practice
When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down" 1. One thing I find funny about this is, even though a decent fraction of the value I've provided for companies has been solving phone-screen level algorithms problems on the job, I can't pass algorithms interviews! When I say that, people often think I mean that I fail half my interviews or something. It's more than half. When I wrote a draft blog post of my interview experiences, draft readers panned it as too boring and repetitive because I'd failed too many interviews. I should summarize my failures as a table because no one's going to want to read a 10k word blog post that's just a series of failures, they said (which is good advice; I'm working on a version with a table). I’ve done maybe 40-ish "real" software interviews and passed maybe one or two of them (arguably zero) 2. Let's look at a few examples to make it clear what I mean by "phone-screen level algorithms problem", above.
At one big company I worked for, a team wrote a core library that implemented a resizable array for its own purposes. On each resize that overflowed the array's backing store, the implementation added a constant number of elements and then copied the old array to the newly allocated, slightly larger, array. This is a classic example of how not to implement a resizable array since it results in linear time resizing instead of amortized constant time resizing. It's such a canonical example that it's often used as the go-to illustration when demonstrating amortized analysis.
For people who aren't familiar with big tech company phone screens, typical phone screens that I've received are one of: an "easy" coding/algorithms question, maybe with a "very easy" warm-up question in front. A series of "very easy" warm-up questions, followed by an "easy" question. Or, a mix of both. The idea is to test the candidate's ability to think through problems quickly and come up with a solution that's both efficient and correct.
Now, here's the thing: I've spent years working on real-world problems that are essentially phone-screen level. I've solved countless algorithms problems that would fit comfortably on a phone screen. But when it comes to interviews, I struggle. Why is that?
One possible explanation is the difference between theory and practice. In theory, algorithms interviews are about testing your ability to think logically and come up with efficient solutions. In practice, they're about more than just the technical aspects. They're about how you handle pressure, how you communicate your ideas, and how well you can articulate your thought process.
During a phone screen, you have limited time to come up with a solution. You might be asked to explain your reasoning step by step, and if you can't do that clearly, you might fail. But in the real world, you have more time to think, discuss with colleagues, and refine your approach. You can look up information, ask questions, and iterate on your solution.
Another factor is the interviewer's perspective. When interviewers ask algorithm questions, they're looking for candidates who can not only solve the problem but also demonstrate a deep understanding of the underlying concepts. They want to see that you can think about time complexity, space complexity, and edge cases. But in the real world, these considerations are often secondary to the practicality of the solution. You might choose a slightly less efficient algorithm if it's easier to implement or if it results in better performance in practice.
Let's take the resizable array example again. In an interview, you might be asked to explain why the naive approach of adding a constant number of elements and copying the array is inefficient. You might need to discuss amortized analysis and how it applies to resizable arrays. In the real world, you might have encountered this problem while working on a project and come up with a solution that's more practical, even if it's not the most theoretically optimal one.
This disconnect between theory and practice is something that many people in the tech industry grapple with. On one hand, you want to be efficient and correct. On the other hand, you also want to be pragmatic and deliver results. It's a balance that's hard to strike, especially under the pressure of an interview.
So, why do algorithms interviews persist if they're so disconnected from real-world practice? Partly, it's because they're a useful tool for interviewers to assess candidates' problem-solving skills. They can't ask candidates to build a whole product during an interview, so they use algorithms questions as a proxy. And partly, it's because the theory behind algorithms is still relevant. Understanding time complexity, space complexity, and algorithmic concepts is essential for building scalable and efficient systems.
But there's a risk that algorithms interviews might become too focused on theory, to the detriment of practical skills. Candidates might be selected based on their ability to solve theoretical problems, rather than their ability to build real-world solutions. This could lead to a mismatch between the skills that are valued in interviews and the skills that are actually needed in the job.
In conclusion, algorithms interviews are a crucial part of the hiring process in the tech industry. They help interviewers assess candidates' problem-solving skills and their understanding of fundamental concepts. However, there's a risk that they might become too disconnected from real-world practice. To mitigate this, interviewers should consider evaluating candidates based on a broader range of skills, including practical problem-solving, communication, and teamwork. And candidates should be prepared to demonstrate not just their theoretical knowledge, but also their ability to apply it in a real-world context.
1. The quote is a common answer from tech companies, emphasizing the importance of efficient algorithms to handle large-scale systems.
2. The author's experience with frequent interview failures highlights the challenges of translating real-world problem-solving skills into interview settings.










