上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 63 下一页
摘要: int recursion(struct TreeNode* root,int* sum){ if(!root) return 0; int left=recursion(root->left,sum); int right=recursion(root->right,sum); (*sum) += 阅读全文
posted @ 2020-11-30 09:17 温暖了寂寞 阅读(73) 评论(0) 推荐(0) 编辑
摘要: void recursion(int* t, int minute, int hour, int n, int cur, int start, char** arr, int* pst){ if (minute >= 60 || hour >= 12) return; if (cur == n){ 阅读全文
posted @ 2020-11-29 22:54 温暖了寂寞 阅读(100) 评论(0) 推荐(0) 编辑
摘要: bool buddyStrings(char * A, char * B){ char a,b,cnt=0; int len1=strlen(A), len2=strlen(B), i, hash[26]={0}; if(len1 != len2) return false; if(strcmp(A 阅读全文
posted @ 2020-11-29 18:29 温暖了寂寞 阅读(97) 评论(0) 推荐(0) 编辑
摘要: char ** buildArray(int* target, int targetSize, int n, int* returnSize){ char** arr = (char**)calloc(200,sizeof(char*)); int i, j=0, pst=0; for(i=1; i 阅读全文
posted @ 2020-11-29 15:59 温暖了寂寞 阅读(71) 评论(0) 推荐(0) 编辑
摘要: int cmp(const void* a,const void* b){ return *(int*)a-*(int*)b; } bool canMakeArithmeticProgression(int* arr, int arrSize){ qsort(arr,arrSize,sizeof(i 阅读全文
posted @ 2020-11-29 14:32 温暖了寂寞 阅读(90) 评论(0) 推荐(0) 编辑
摘要: bool canPlaceFlowers(int* flowerbed, int flowerbedSize, int n){ if (n==0) return true; if(flowerbedSize==1){ return !flowerbed[0]; } else{ if(flowerbe 阅读全文
posted @ 2020-11-29 14:06 温暖了寂寞 阅读(71) 评论(0) 推荐(0) 编辑
摘要: int oddCells(int n, int m, int** indices, int indicesSize, int* indicesColSize){ int i, j, cnt=0; int rhash[50]={0}, chash[50]={0}; for(i=0; i<indices 阅读全文
posted @ 2020-11-29 12:18 温暖了寂寞 阅读(65) 评论(0) 推荐(0) 编辑
摘要: bool canFormArray(int* arr, int arrSize, int** pieces, int piecesSize, int* piecesColSize){ int hash[101]={0}, i, j; for(i=0; i<arrSize; i++) hash[arr 阅读全文
posted @ 2020-11-29 10:51 温暖了寂寞 阅读(74) 评论(0) 推荐(0) 编辑
摘要: int recursion(struct TreeNode* root, bool* flag){ if(!root) return 0; int left=recursion(root->left, flag); int right=recursion(root->right, flag); if 阅读全文
posted @ 2020-11-28 23:59 温暖了寂寞 阅读(44) 评论(0) 推荐(0) 编辑
摘要: bool checkStraightLine(int** coordinates, int coordinatesSize, int* coordinatesColSize){ float a=0,b; int i; for(i=0; i<coordinatesSize-1; i++){ if(co 阅读全文
posted @ 2020-11-28 22:50 温暖了寂寞 阅读(87) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 63 下一页