Expedia Interview Question: coding test: Give a linked li... | Glassdoor

Interview Question

Software Development Engineer I Interview Bellevue, WA

coding test: Give a linked list, what is the most efficient

  way to find the middle node?
Answer

Interview Answer

1 Answer

0

- go through each node, then you can get the middle node
 - go through the linked list, and do the reverse in the same time (memory wasting)
 - set a temp node, which does 2 or 3 times faster then the original one (the answer he likes)

Interview Candidate on Dec 16, 2011

Add Answers or Comments

To comment on this, Sign In or Sign Up.