Amazon Interview Question

Question was a reversed linked list problem