public static void printPattern(int n , int row , int col) {
if(row == n )
return;
while(row > col) {
System.out.print("*");
col++;
}
col = 0;
System.out.println("*");
printPattern(n,row+1,col);
}
Hi Team,
I have written an alternative code for this problem , can u please verify whether this is also good