class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>> result(numRows);
for(int i=0; i<numRows; i++){
result[i].resize(i+1);
result[i][0]=result[i][i]=1;
for(int j=1; j<i; j++)
result[i][j]=result[i1][j1]+result[i1][j];
}
return result;
}
};
C++ implementation refered to @mzchen

@StefanPochmann Hello, I have always meet some trouble when writing my implementation, here is a problem that troubles me now. I hope you can help me. .^~^.
https://leetcode.com/discuss/87997/wacimplementationwaitingforhelp