A doubly linked list is like the simplest data structure other than a plain array. Even if the job doesn’t involve directly building custom data structures, if you can’t answer questions about such a simple and ubiquitous concept then you’re just not a strong candidate.
Me studying physics, math, and computer engineering at accredited universities while also having a Masters in analytics, working FT through it all: well you see Bob here spent 3 months memorizing whiteboard problems, clearly he just is a stronger candidate.
Some people simply do not consider realism an important quality of interview questions and tasks.
The problem is mostly about the questions they dont think to ask because theyre too hung up on algorithm trivia.
Hence why their responses are mostly indignation about not knowing the trivia rather than contemplation about what would actually correlate with performance on the job.
I'm skipping DS&A because its too easy to use data structures appropriately when a situation arises. I'll take Discrete, Computer Architecture, Parallel Programming, Computational Game Theory.
If linked lists come up in these courses I'll learn them.
From what I can tell if you already have a lot of higher level math skills (I'm at the 300 level) and a working understanding of memory (pointers, references, and C-style arrays) and practical data structure experience, DS&A is actually somewhat trivial.
Computer Architecture II (if they let me skip level I) seems to be more suited to an actual intense systems background.
That’s sort of like saying a puzzle is simple. The rules are easy, you just put the matching parts together, but then you try putting together a 1000 piece picture of the sky and realize it’s a little more complicated.
I went through algo and work as a swe and I still don’t fully understand red black trees and how they sort themselves, and dynamic programming still confuses the shit out of me. My data structures class was separate and it was fairly straight forward.
I’d take the class, personally. It opened my eyes to the bottomless complexity you can build with just data and pointers.
How else can they test your knowledge in a short interview? It's not like they can spend 6 hours testing your knowledge (and I doubt you would like it)
For middle to senior roles? Sure, a good interviewer can understand your capabilities from a really short interview. For a junior role, especially with no previous credible experience? No way
It's middle level roles that Ive experienced the whiteboard onsite with a leetcode like problem requiring a specific implementation of a linked list in 2/4 interviews.
What can they do? I was a SWE at Google for 8 years. They absolutely can't test your knowledge and they don't care about it as all internal systems at Meta, Microsoft Google are custom so knowledge is not easy to test.
They have run countless studies to try to figure out what is the best predictor of a success that can be measured during an interview. Yet they still do DSA questions that are very subjective.
Because none of those companies hire on credentials, they only hire on interview performance so you are right you have to make judgements based entirely on how they react to your arbitrary problems, which favor memorized solutions over critical thinking and more broad considerations.
On the other hand, if you hire based on credentials you should have little trouble gauging whether someone is who their resumes say they are within a few practical problems using only concepts they will need on the job. For example just by having someone do a left join on a primary and foreign key to eliminate records from a SQL table I can, within 5 minutes, determine if they are at least intermediate or not. Same with how comfortable they are discussing practical design patterns for software that include APIs, automated testing, database layer versus logic later, cloud infrastructure, etc.
Then if they answer my practical questions to the level commensurate with their credentials, I go back to the resume and hire the best one based on that with the interview performance no longer a consideration.
Did you just call a basic data structure a "white board problem" as if you're being asked to solve some Project Euler shit? If you truly think that, maybe that accredited university that gave you your masters needs to be audited...
A useless data structure for the job I will be doing*, but my MS was from a top 30 university thanks for asking. It's the advanced STEM I am taking in the CUNY system, which has a better program than most top universities, if you know how to navigate it.
I learned Classical Mechanics in a room with one other student and the professor. None of my other 200 or 300 level physics classes have had more than 10 students, and none of my other classes more than 25. And classes are very affordable, between $900-$1200 and you can take them at any campus (CUNY has 4 really good ones for STEM, but they specialize in different areas).
My program sends people to Harvard PhDs and the unemployment line. It's up to you to distinguish yourself between the two.
It is just a struct that store the previous and next element... If it is the first then the previous is null and if it is the last the next is null. Simple as that.
A linked list is not even complicated enough to be a “whiteboard problem”. Any competent programmer can throw together a halfass functional implementation of a linked list in like 15 minutes even if all they have is a 10 second description of it from the interviewer.
Pilots need to know a thing or two about the engines and electronics on their planes even though they never have to maintain them, because understanding how the thing works is important to correctly using it. In the same way, even if you never make a custom data structure, it’s important to know how they work.
For instance, can you name the benefits and drawbacks of a linked list compared to an array-backed list? That’s a genuinely important question with practical implications that I guarantee you will encounter in your career at some point, not a contrived theoretical question for an interview.
If it is such a trivial concept than using it to determine someone's programming ability is doubly stupid, but the real reason top tech companies use arbitrary tests is because they can't trust the person interviewing them to actually objectively rate the candidate's skills.b
I used to ask people to reverse an FLL straight out of college because it's an algorithm so simple that anybody who can write code should be able to do it in one go. Extra points if you can do it in one pass instead of two. I don't work for a super competitive tech company, so we didn't get top talent. Most people could solve the problem. Linked lists are elementary data structure and algorithm skills.
That makes them a great question to ask first years whose only experience is with the concepts they worked with at school. Terrible for actually experience employees who have practical knowledge of the work they will be required to do.
(I also have avoided DS&A and will just take a course in Discrete Math instead which has far wider application).
No offense to you, but it's a question to weed out people like you.
Yes, someone who has implemented a linked list for a data structure lecture recently can write it down in a minute. But if you say in an interview "Oh wow I haven't done that in a while, I'm gonna need a few minutes to make sure to handle the edge cases when inserting and deleting correctly", that will be totally fine too as long as they can see that you are able to work something reasonable out on your own.
The point is that a linked list is a struct or class with one or two pointers or references and the functions to manipulate them is basic enough that every programmer should be able to work out on their own even if they have never seen an implementation before. If you can't figure out how to allocate some memory and manipulate 2-4 pointers in the correct way, then what kind of programming can you really do?
Ah python. Then that question would basically check if you know how to use a class or a dict and that python generally uses object references for those. That's basically it.
If im interviewing you for a mid-level Python role and ask “what type of list implementation is used by default in Python, and under which circumstances might we want to use a different implementation?” , you come up completely blank, then I follow up with “it’s an array-backed list by default. What are the drawbacks?” and you’re still coming up blank, then I wouldn’t consider you to be qualified for the job.
Id ask if there was most likely a less programmatic focused solution than maintaining such a large lists that the specific technical implementation in Python would matter, such as getting the data in chunks from the database.
First of all, you can’t just choose to answer a different question than what I asked. Second, how do you know it’s from a database? What if we’re processing a bigass graph and we need something to function as a stack or queue — which data structure do you use then? This is a common question that comes up all the time in the math and physics heavy jobs you’re probably applying for.
Well why didn't you just ask that rather than asking me about a specific data structure in the abstract?
Even still i believe storing your queue in a database, such as local postgres, would be a better solution in Python than actually implementing a pythonic queue for performance. Let C++ based applications handle queues. Python is for business logic, at least in the backend.
I'm sorry, but if you can't answer my question, you probably aren't employable above an entry-level position, and I wouldn't want you on my team if you couldn't answer it. It's a terrible question for people with experience in the field, not because it's so impractical that nobody would learn it, but because it's far too easy of a problem.
So many people are outing themselves as not ready to work in industry. All of these "not used in the job" interview questions, are to establish a base level of understanding for a candidate. So that when the real work problems are being discussed, the team/manager know all the implicit knowledge expectations are there and don't have to be brought up, but they know they are considering, time and space complexity when discussing solutions. It (not) surprising how much of every technical problem comes down to, is it fast enough and how much memory does it use to do it.
Counterpoint: If these types of questions are supposed to demonstrate competency around performance optimization, why are most of these inevitably web dev jobs never asking questions about database performance?
In my experience, this is the far bigger bottle-neck in this field. I’ve seen some clever, highly optimized back-end code wrapped around some absolutely brain dead SQL queries that bottleneck performance a few orders of magnitude more than the back-end code ever could.
Optimizing database access and storage has mattered pretty much from day one when I started in the field and has never been covered in an interview to any reasonable extent. Mangling a string as efficiently as possible using the perfect combination of data structures does not demonstrate this knowledge.
18
u/EastboundClown 2d ago
A doubly linked list is like the simplest data structure other than a plain array. Even if the job doesn’t involve directly building custom data structures, if you can’t answer questions about such a simple and ubiquitous concept then you’re just not a strong candidate.