Please tell me whats wrong in this code


#1

public class Solution {
public int[][] solve(int A) {
int b[][]=new int[A][];
for(int x=1;x<=A;x++)
b[x-1]=new int[x];
for(int i=1;i<=A;i++){
int c=1;
for(int j=1;j<=b[i-1].length;j++){
b[i-1][j-1]=c;
c=c*(i-j)/j;
}
}
return b;
}
}