function to print the list
public static void Print ( Node n ) { Node cur = n ; while ( cur != null ) { System . out . print ( cur . data + " ▁ " ) ; cur = cur . next ; } System . out . println ( ) ; }