Why Data Structures Are Irrelevant to Software Engineering Interviews
medium.com
medium.com
For example, instead of an "indexable skip list" (whatever that is) I'd have said a red-black tree (or whatever) where each node keeps track of how many elements are in its subtree. At least if a simple log(n) solution is tolerable. And you know, I've never seen this problem before. I didn't "memorize the answer." You have to put together general background knowledge and find a solution. Putting summary information on the nodes of a tree is a general-purpose data structures trick.
Also, take, for example, the cycle finding problem. I came across that question once in a low-pressure situation and invented Brent's algorithm. Today, that is a bad interview question because it's too famous. But generally speaking it's very easy to solve if you've never seen it before: maintain a hash table of the pointers you've seen. Does that take up too much space? You can adapt that solution to use less space.
Granted, there are developers that can get some kinds of useful stuff done that can't figure out math problems or algorithms problems on the spot, but it's wrong to conclude that other people are memorizing answers to these questions. After all, interviewers at some companies are trying to come up with questions and tasks people haven't heard before and keep their questions secret.
And I've asked questions that people didn't already know the answer for, and guess what they do? Many of them figure out the answer. After all, they're questions designed to be ones that you can figure out the answer to in 20-30 minutes.
The author used the word "trivia" and I couldn't agree more since your can google the answer. Trivia interview questions are a result of our industry not having the resources to teach beginners. I'd much rather hire people who are intellectually curious and can learn on the job.
if you don't have some basic understanding of costs and complexity, and have a vague notion about how things are implemented "under the hood", then you probably aren't really that useful.
If they really cared about a "basic understanding of costs and complexity" they'd ask questions about the basics. These are highly specialized "gotcha" questions that do not correlate with actual job performance.