Driver code
public static void Main ( string [ ] args ) { ListNode head = null ; head = push ( head , 70 ) ; head = push ( head , 60 ) ; head = push ( head , 50 ) ; head = push ( head , 40 ) ; head = push ( head , 30 ) ; head = push ( head , 20 ) ; head = push ( head , 10 ) ; ListNode tmp = head ; Console . Write ( " Given ▁ List : ▁ " ) ; while ( tmp != null ) { Console . Write ( tmp . data + " ▁ " ) ; tmp = tmp . next ; } Console . WriteLine ( ) ; int m = 3 , n = 6 , k = 2 ; Console . Write ( " After ▁ rotation ▁ of ▁ sublist : ▁ " ) ; rotateSubList ( head , m , n , k ) ; } }