Thoughtworks interview question

Linked list