C++ basic solution


#1

vector<vector > Solution::solve(int A) {
vector<vector> V(A);//row size A
for (int i =0;i<A;i++){
V[i].resize(i+1);//have to do,
for (int j= 0;j<=i;j++){
if(j==0||j==i){
V[i][j]=1;
}
else{
V[i][j]=V[i-1][j]+V[i-1][j-1];
}
}
}
return V;
}