Program for n 'th node from the end of a Linked List |
static void printNthFromLast ( Node head , int n ) { static int i = 0 ; if ( head == null ) return ; printNthFromLast ( head . next , n ) ; if ( ++ i == n ) System . out . print ( head . data ) ; }