题目:
题解:
int* getRow(int rowIndex, int* returnSize) {
*returnSize = rowIndex + 1;
int* row = malloc(sizeof(int) * (*returnSize));
row[0] = 1;
for (int i = 1; i <= rowIndex; ++i) {
row[i] = 1LL * row[i - 1] * (rowIndex - i + 1) / i;
}
return row;
}