Reverse Linked List II

Try to solve the Reverse Linked List II problem.


Given a singly linked list with nn nodes and two positions, left and right, the objective is to reverse the nodes of the list from left to right. Return the modified list.


  • 11 \leq n 500\leq 500
  • 5000-5000 \leq 5000\leq 5000
  • 11 \leq left \leq right \leq n


Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy