Amazon interview question

How to solve a double linked list