上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 63 下一页
摘要: typedef struct { int hash[4]; } ParkingSystem; ParkingSystem* parkingSystemCreate(int big, int medium, int small) { ParkingSystem* obj=(ParkingSystem* 阅读全文
posted @ 2020-11-22 11:44 温暖了寂寞 阅读(96) 评论(0) 推荐(0) 编辑
摘要: typedef struct { int cur; int n; char** value; } OrderedStream; OrderedStream* orderedStreamCreate(int n) { OrderedStream* obj=(OrderedStream*)calloc( 阅读全文
posted @ 2020-11-22 11:31 温暖了寂寞 阅读(118) 评论(0) 推荐(0) 编辑
摘要: char * destCity(char *** paths, int pathsSize, int* pathsColSize){ int col = *pathsColSize; char *cur = paths[0][col-1]; for(int i = 1; i < pathsSize; 阅读全文
posted @ 2020-11-20 19:47 温暖了寂寞 阅读(74) 评论(0) 推荐(0) 编辑
摘要: bool detectCapitalUse(char * word){ bool smallFlag=false; int cnt=0; for(int i=0; i<strlen(word); i++){ if(word[i]>='A' && word[i]<='Z'){ cnt++; if(sm 阅读全文
posted @ 2020-11-20 18:42 温暖了寂寞 阅读(87) 评论(0) 推荐(0) 编辑
摘要: bool containsPattern(int* arr, int arrSize, int m, int k){ for (int i=0; i+m*k <= arrSize; ++i) { bool flag = true; for (int j=i+m; j<i+m*k && flag; j 阅读全文
posted @ 2020-11-20 16:06 温暖了寂寞 阅读(87) 评论(0) 推荐(0) 编辑
摘要: int recursion(struct TreeNode* root, int* max){ if (!root) return 0; int left=recursion(root->left,max); int right=recursion(root->right,max); if(left 阅读全文
posted @ 2020-11-20 15:06 温暖了寂寞 阅读(74) 评论(0) 推荐(0) 编辑
摘要: int distanceBetweenBusStops(int* distance, int distanceSize, int start, int destination){ int dst1=0,dst2=0; int i=start; while(i%distanceSize != dest 阅读全文
posted @ 2020-11-20 10:56 温暖了寂寞 阅读(118) 评论(0) 推荐(0) 编辑
摘要: int distributeCandies(int* candyType, int candyTypeSize){ int cnt=0; int hash[200001]={0}; for (int i=0; i<candyTypeSize; i++){ if (hash[candyType[i]+ 阅读全文
posted @ 2020-11-20 10:11 温暖了寂寞 阅读(85) 评论(0) 推荐(0) 编辑
摘要: int* distributeCandies(int candies, int num_people, int* returnSize){ int i=0; int* arr = (int*)calloc(num_people,sizeof(int)); while(candies>0){ arr[ 阅读全文
posted @ 2020-11-20 09:41 温暖了寂寞 阅读(58) 评论(0) 推荐(0) 编辑
摘要: int* divingBoard(int shorter, int longer, int k, int* returnSize){ int val=longer-shorter,i; *returnSize=0; int* arr=(int*)calloc(k+1,sizeof(int)); if 阅读全文
posted @ 2020-11-19 12:19 温暖了寂寞 阅读(83) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 63 下一页