4 ms·
I actually once got this question in an interview for a big search company: "Reverse a linked list, in place". I scetched a solution on the whiteboard, drawing
by roschdal 17y ago
I actually once got this question in an interview for a big search company: "Reverse a linked list, in place".
I scetched a solution on the whiteboard, drawing nodes and pointer arrows. I didn't manage to write code to solve the problem, unfortunately, and I didn't get the job...
I consider myself a pretty decent programmer, but I know that I'm not very good at discovering solutions to tough new problems "on the spot".
What does such a interview question really reveal about my abilities? I know that I could have solved the problem in about 10 minutes given a Python interpreter, but given the turmoil of an interview, I didn't.