上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 63 下一页
摘要: int add(int a, int b){ long long temp; while(a){ temp = a&b; b = a^b; a=temp*2; } return b; } 阅读全文
posted @ 2020-12-02 14:14 温暖了寂寞 阅读(78) 评论(0) 推荐(0) 编辑
摘要: #define MAXLEN 10001 int* addToArrayForm(int* A, int ASize, int K, int* returnSize){ int* arr=(int*)calloc(sizeof(int),MAXLEN); int i, pst=MAXLEN, fla 阅读全文
posted @ 2020-12-02 12:14 温暖了寂寞 阅读(80) 评论(0) 推荐(0) 编辑
摘要: typedef struct { int front[2]; int rear[2]; int* arr[2][20001]; int noAnimal[2]; } AnimalShelf; AnimalShelf* animalShelfCreate() { AnimalShelf* obj=(A 阅读全文
posted @ 2020-12-02 10:46 温暖了寂寞 阅读(154) 评论(0) 推荐(0) 编辑
摘要: int arrangeCoins(int n){ int i; for(i=1; n>=0; i++) n-=i; return i-2; } 阅读全文
posted @ 2020-12-02 09:21 温暖了寂寞 阅读(72) 评论(0) 推荐(0) 编辑
摘要: /*C语言*/ int cmp(const void* a,const void* b){ return *(int*)a>*(int*)b; } int arrayPairSum(int* nums, int numsSize){ int sum=0, i; qsort(nums,numsSize 阅读全文
posted @ 2020-12-02 09:16 温暖了寂寞 阅读(75) 评论(0) 推荐(0) 编辑
摘要: int cmp(const void* a,const void* b){ return *(int*)a-*(int*)b; } int findContentChildren(int* g, int gSize, int* s, int sSize){ int i=0, j=0, cnt=0; 阅读全文
posted @ 2020-12-01 22:47 温暖了寂寞 阅读(35) 评论(0) 推荐(0) 编辑
摘要: int numRookCaptures(char** board, int boardSize, int* boardColSize){ int cnt = 0, st = 0, ed = 0; int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0} 阅读全文
posted @ 2020-12-01 17:54 温暖了寂寞 阅读(93) 评论(0) 推荐(0) 编辑
摘要: double average(int* salary, int salarySize){ int min=1000000,max=1000,i,sum=0; for(i=0; i<salarySize; i++){ if(salary[i]<min) min=salary[i]; if(salary 阅读全文
posted @ 2020-12-01 16:05 温暖了寂寞 阅读(88) 评论(0) 推荐(0) 编辑
摘要: double* averageOfLevels(struct TreeNode* root, int* returnSize){ struct TreeNode* tn[1000]; double* arr=(double*)calloc(1000,sizeof(double)); int left 阅读全文
posted @ 2020-12-01 15:24 温暖了寂寞 阅读(50) 评论(0) 推荐(0) 编辑
摘要: bool backspaceCompare(char* S, char* T) { int i = strlen(S) - 1, j = strlen(T) - 1; int skipS = 0, skipT = 0; while (i >= 0 || j >= 0) { while (i >= 0 阅读全文
posted @ 2020-12-01 14:35 温暖了寂寞 阅读(77) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 63 下一页