Back to course home
0% completed
Vote For New Content
Reverse a Sub-list (medium)
Problem Statement
Given the head of a LinkedList and two positions ‘p’ and ‘q’, reverse the LinkedList from position ‘p’ to ‘q’.
Constraints:
- The number of nodes in the list is n.
1 <= n <= 500
-500 <= Node.val <= 500
1 <= p <= q <= n
Try it yourself
Try solving this question here:
Python3
Python3
. . . .
.....
.....
.....
Like the course? Get enrolled and start learning!
On this page
Problem Statement
Try it yourself