Amazon Interview Question

A leetcode linked list question on manipulating prev and next pointers