3 ms·
Sort of off-topic, but I'm interested in how often you reverse a linked list at your job. Is that something that you expect people to be able to do? If so, wha
by Jemaclus 7y ago
Sort of off-topic, but I'm interested in how often you reverse a linked list at your job.
Is that something that you expect people to be able to do? If so, what does it tell you about them? If they don't know what a linked list is or how to reverse it, what does that tell you about their real-world coding knowledge or lack thereof?
- Jemaclus 7y agoFor anyone downvoting, it's a serious question. We're debating these kinds of algorithms as interview questions at my job, and I was curious what this brings to the table versus, say, building a CRUD API or constructing SQL queries or anything else. For example, I've been in the industry for 15 years and I've never had to construct a linked list (much less reverse one) in my career. I have had to build APIs, construct DB queries, create distributed systems, etc, etc. So I naturally wonder why constructing a linked list might result in rejection for a job, unless it's something you're actually expected to do on the job for that role. Am I missing something?
- muzani 7y agoWe don't use linked lists, but it's a test to see if they understand pointers. Pointers are used quite often for a number of things. A binary search might be a better test, but it's even harder and not as guided as a linked list modification test. Oh, to note, it's a code modification test, not a whiteboard algorithm thing.
- Jemaclus 7y agoAh, gotcha. That makes a lot more sense. If you were asking them to write a linked list implementation from scratch, I'd have a lot more questions. Having an already-implemented LL and modifying that is a lot more reasonable. Thanks!