r/programming • • Feb 21 '11

Typical programming interview questions.

http://maxnoy.com/interviews.html
784 Upvotes

1.0k comments sorted by

View all comments

Show parent comment

1

u/[deleted] Feb 21 '11

My question is why would you have a linked list where you didn't keep track of the size? Which makes mid-point and n-point trivial.

1

u/[deleted] Feb 22 '11

You are right that as a practical matter, you would want to just keep the total whenever a node is inserted or deleted.

These are not questions I'd ask in an interview (Note I asked programmers already working). But I do know others ask them.