3 ms·
I'm going by memory of Spolsky's article, from when I read it many years ago. One of his main points was that in asking a person to reverse a linked list, he wa
by mariodiana 6y ago
I'm going by memory of Spolsky's article, from when I read it many years ago. One of his main points was that in asking a person to reverse a linked list, he watched to see if the person first sketched out a diagram, or simply started writing code -- because, as he believed, no one could do this without first sketching out a diagram, and going right to code was a red flag, indicating someone who (my memory is foggier, here) lacked the right temperament for a developer.
- dragonsngoblins 6y agoCouldn't they just... mentally imagine the diagram? I personally am bad at picturing things in my head but a simple linked list is pretty easy to do, and it isn't as if reversing one is an especially complex operation. To be clear I'm not trying to suggest you think a candidate couldn't do that, I'm just surprised that this apparently didn't occur to Spolsky
- Jtsummers 6y agohttps://www.joelonsoftware.com/2006/10/25/the-guerrilla-guide-to-interviewing-version-30/ https://www.joelonsoftware.com/2006/10/25/the-guerrilla-guid... I don't see anything in this about diagramming. In fact, from an earlier comment in that article this would be an "easy" or "medium" problem, and how quickly someone can solve these is something he considers. Does it take you 20 minutes to reverse a linked list, even with his Google-search like hints, or does it take you < 5 minutes because it comes to you quickly and any delay is talking or trying to keep a consistent pseudo code format on the white board?