Function recursively prints the strings having space pattern i and j are indices in ' String ▁ str ' and ' buf [ ] ' respectively
static void printPatternUtil ( String str , char buf [ ] , int i , int j , int n ) { if ( i == n ) { buf [ j ] = ' \0' ; System . out . println ( buf ) ; return ; }