Reverse In Range
1. Given a singly linklist, Reverse a linkedlist from position starting position to end position.Input Format
2. Do it in one-pass. without using any extra space.
3. Indexing start from numeric 1.
8->8->14->1->10->12->nullOutput Format
3
5
8->8->10->1->14->12->nullQuestion Video Constraints
1 <= size Of LinkedList <= 10^6Sample Input
1 <= starting Position, ending Position <= 10^6
6Sample Output
8 8 14 1 10 12
3
5
8 8 10 1 14 12
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run