leetcode-119. 杨辉三角 II-C语言



/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* getRow(int rowIndex, int* returnSize){
    int *a1 = (int **)malloc(sizeof(int * ) * (rowIndex + 1));
    int *a2 = (int **)malloc(sizeof(int * ) * (rowIndex + 1));
    int i, j, r=0;
    int *src, *dst;

    
    
    a1[0] = a2[0] = 1;
    
    for(i=0; i0 && j

你可能感兴趣的:(LeetCode)