4 ms·
Last fall, I had an interview where they asked me to reverse a linked-list in python and to filter out every unique items of a list. I failed because I did not
by lemieux 15y ago
Last fall, I had an interview where they asked me to reverse a linked-list in python and to filter out every unique items of a list. I failed because I did not remember the API by heart and they tried to impress me with a python one-liner that would do the job for me. Not so sure if the interview was for me or for them... Complete waste of time.
- nirvdrum 15y agoThey wouldn't allow you to substitute your own implementation? That's rather odd. I'd be more interested in whether you knew how to traverse a linked list than I would be in any knowledge of the Python API.
- gideons 15y agoI don't think reversing a link-list and removing unique items requires any special Python knowledge. No magical API needs to be used, just the basics. A white board interview shouldn't exclude naive implementations. After the naive implementation has been done it's reasonable to ask for less naive approaches. Also the continual whining about white board interviews is tiresome. It's a fact of life that exists in almost any tech interview you do. Practice, get your friends to bust your balls before the fact, write itoa on a white board or detect a loop in a singly linked list and move on with your life. At some point if you're going to get paid you need to demonstrate your ability, reality says the potential employer decides what type of proof is required.
- lemieux 15y agoI did some pseudo-code to show them how I would do it. They kept telling me to code it. As for the filtering, I did my own implementation with a loop but I guess the ultimate goal of that question was to see if I knew the one-liner..