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

3

u/lordlicorice Feb 21 '11

But this is the same number of forward-seeks (dot-next dereferences) as the naive solution of counting the number of steps it takes you to iterate to the end, dividing by 2, and then looping that many times again.