This function take head pointer of list , start and end points of sublist that is to be rotated and the number k and rotate the sublist to right by k places .
void rotateSubList ( ListNode * A , int m , int n , int k ) { int size = n - m + 1 ;