Redirecting to
NADOS

Reverse In Range

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

1. Given a singly linklist, Reverse a linkedlist from position starting position to end position.
2. Do it in one-pass. without using any extra space.
3. Indexing start from numeric 1.
Input Format
8->8->14->1->10->12->null 
3
5
Output Format
8->8->10->1->14->12->null
Question Video
Constraints
1 <= size Of LinkedList <= 10^6
1 <= starting Position, ending Position <= 10^6
Sample Input
6
8 8 14 1 10 12
3
5
Sample Output
8 8 10 1 14 12 


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name