Lyft interview question

check distance between values in linked list