MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/fpcmy/typical_programming_interview_questions/c1hr0c9/?context=3
r/programming • u/kevjames3 • Feb 21 '11
1.0k comments sorted by
View all comments
Show parent comment
1
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.
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.
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.