4 ms·
A linked list is so simple that you should know how to implement one off the top of your head. It's literally: struct list_node { struct list_node
by teacup50 10y ago
A linked list is so simple that you should know how to implement one off the top of your head.
It's literally:
struct list_node {
struct list_node *next;
...
};
There, you know how linked lists work :)
- quaunaut 10y agoThat's what I came up with in my head, but my issue is, in an interview I'd not be confident with that kind of an answer. I've never done that before, I've never had a reason to do that before. I've contributed to Rails, graphing libraries, written docs for complex JS projects, implemented caching solutions, written authentication and authorization backends- but this here is like asking an architect to cut down a tree. Sure, he can figure it out, but he's gonna look stupid for the first few minutes.
- sulam 10y agoThe figuring it out is entirely the point of the interview. When I interview someone, I need to work on a problem with them. The simpler the problem we can work on together, the more likely that I'll learn what they're like to work with, not whether or not they've memorized some trivia like how to implement quicksort in 10 lines of Python.
- quaunaut 10y agoThat's fair, and a totally valid way of going about it. But if I'd been devving for a few years and hadn't heard the term "linked list", and the interviewer scoffed at having to answer the question of what it was, I get uninterested real fast.
- deleted 10y ago[deleted]