+ 3
How to right rotate a linked list in java?
input-1 2 3 4 2 output -3 4 1 2 input-1 2 3 4 3 output-2 3 4 1
2 Answers
+ 13
1 2 3 4
3
no. of elements of linked list is n=4 & b=3 ,
take out b elements from (n-b)th posn & then take out (n-b) elements from the starting