摘要:
int uniquePaths(int m, int n){ int* arr=(int*)calloc(n,sizeof(int)); arr[n-1]=1; int i; while(m-->0){ for(i=n-1; i>=0; i--){ arr[i]+=(i+1<n)?arr[i+1] 阅读全文
摘要:
struct ListNode* rotateRight(struct ListNode* head, int k){ if(!head) return NULL; struct ListNode* arr[1000]; int cnt=0, i, n; while(head){ arr[cnt++ 阅读全文
摘要:
int** generateMatrix(int n, int* returnSize, int** returnColumnSizes){ *returnSize=n; int** arr=(int**)calloc(n,sizeof(int*)); *returnColumnSizes=(int 阅读全文
摘要:
int cmp(const void*a, const void*b){ return (*(int**)a)[0] > (*(int**)b)[0]; } int** merge(int** intervals, int intervalsSize, int* intervalsColSize, 阅读全文