92. Reverse Linked List II
Difficulty:: Medium
Reverse a linked list from position m to n. Do it in one-pass.
*Note: *1 ≤ m ≤ n ≤ length of list.
Example:
1 | Input: 1->2->3->4->5->NULL, m = 2, n = 4 |
Solution
Language: Java
1 | /** |
Difficulty:: Medium
Reverse a linked list from position m to n. Do it in one-pass.
*Note: *1 ≤ m ≤ n ≤ length of list.
Example:
1 | Input: 1->2->3->4->5->NULL, m = 2, n = 4 |
Language: Java
1 | /** |