Guidewire Interview Question

Find the kth to last node in a linked list.

Interview Answer

Anonymous

Apr 5, 2019

Iterate the first pointer k times through the list and stop. Start a second pointer from the head, continue until the first pointer drops off the end of the list.