Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would have hated this problem. There are so many things unclearly specified. What allocator is used to allocate this linked list? Did you use a small-object pooled allocator that essentially places the nodes of a linked list sequentially in memory? Did you permute the order of the nodes afterwards? Is each node even located in separate pages, using up the TLB as you dereference? Could there be page faults when you deref the next field? Without knowing how the nodes are laid out in memory, it is impossible to answer.

Unless of course, you merely use this question as a ruse to elicit a discussion about low-level systems programming.



> Unless of course, you merely use this question as a ruse to elicit a discussion about low-level systems programming.

Didn't OP already imply that the point of the question was not as much to get a specific answer, but to probe whether or not the interviewee knows about all the factors that need to be considered?


So why not ask exactly that? "What are some of the factors and tradeoffs to consider when implementing X / deciding between X and Y, etc.?"


You would have done great with this question :)

Asking "Do you know the magic answer I happen to know?" questions is the great sin of technical interviews. Instead the goal is to keep the candidate comfortable and semi-confident while digging out their mindset about relevant technical issues.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: