Driver Program
public static void main ( String [ ] args ) { int n = 3 ; ArrayList < Integer > arr = getRow ( n ) ; for ( int i = 0 ; i < arr . size ( ) ; i ++ ) { if ( i == arr . size ( ) - 1 ) System . out . print ( arr . get ( i ) ) ; else System . out . print ( arr . get ( i ) + " , ▁ " ) ; } } }