4 ms·
Except ... reversing a singularly-linked list recursively is trivial. If you can't do this, you are not qualified at basic manipulation of data structures and
by jblow 11y ago
Except ... reversing a singularly-linked list recursively is trivial.
If you can't do this, you are not qualified at basic manipulation of data structures and you should fail the interview if they want someone with basic competence in data structure manipulation. Sorry but that is how it is.
- laichzeit0 11y agoBecause so often we are faced with having to implement singularly linked-list reversal. I wouldn't even bother implementing this myself in the real world and I have a degree in computer science and 10 years experience doing dev work. I would type the problem into google, survey a couple of solutions and pick one I liked. Done. Next problem please. This is pedantic crap that is a waste of anyone's time. I can't believe people actually get asked shit like this at interviews? Well, at least none that I've ever been to. They look at my resume "Oh, CS degree at well respected University." and you can deduce that this person can probably work out trivial crap like this or look it up in a book or the internet. At most ask them for their academic records. What a complete waste of time in an interview..
- jblow 11y agoThe point is that if you can't do this, there is no way you can do stuff more complicated than this, which will actually be necessary during regular work. (And which you won't be able to type into Google). I run a software company and I'll say straight up I would not hire someone with your attitude.
- VikingCoder 11y agoYeah, you're not getting the point of my story. I know it's trivial. It is trivial. I can do it in my sleep. I used to write Pascal code, back before all these Generics and Templates, and I had to write data structures the old fashioned way. What I'm telling you is that the jet lag got to me. This is like when you can't remember the name of the actor who played Batman in Batman Begins. Or when you can't remember what year your mother was born in. Or you can't remember the capital of the state you're travelling to. Or you're multiplying 7*8 and write down 42 in a momentary lapse. It was a completely "DUH" moment.