摘要: 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 温暖了寂寞 阅读(101) 评论(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) 编辑