k is block size and d is number of rotations in every block .
int k = 3 , d = 2 ; head = rotateByBlocks ( head , k , d ) ; System . out . print ( " Rotated by blocks Linked list "); printList ( head ) ; } }