上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 63 下一页
摘要: int minSubArrayLen(int s, int* nums, int numsSize){ int i, j, sum=0, maxLen=0; int arr[50000]={0}; for (i=0; i<numsSize && maxLen!=1; i++) { sum+=nums 阅读全文
posted @ 2020-12-26 14:07 温暖了寂寞 阅读(50) 评论(0) 推荐(0) 编辑
摘要: void dfs(char** grid, int gridSize, int* gridColSize, int r, int c){ if (r < 0 || r >= gridSize || c < 0 || c >= *gridColSize || grid[r][c] != '1') re 阅读全文
posted @ 2020-12-25 22:23 温暖了寂寞 阅读(110) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * Note: The ret 阅读全文
posted @ 2020-12-25 22:22 温暖了寂寞 阅读(105) 评论(0) 推荐(0) 编辑
摘要: typedef struct{ int hash[4]; }st; int judge(char* s,int start,st* arr,int* size,int* map){ int i, add=0; for (i=start; i<start+10; i++){ if(arr[add].h 阅读全文
posted @ 2020-12-25 18:35 温暖了寂寞 阅读(100) 评论(0) 推荐(0) 编辑
摘要: int compareVersion(char * version1, char * version2){ int i, j, start1, start2, num1, num2, len1 = strlen(version1), len2 = strlen(version2); for (i = 阅读全文
posted @ 2020-12-24 22:01 温暖了寂寞 阅读(76) 评论(0) 推荐(0) 编辑
摘要: int cmp(const void*a,const void*b){ char s1[100],s2[100]; sprintf(s1,"%d%d",*(int *)a,*(int *)b); sprintf(s2,"%d%d",*(int *)b,*(int *)a); return strcm 阅读全文
posted @ 2020-12-24 17:47 温暖了寂寞 阅读(94) 评论(0) 推荐(0) 编辑
摘要: int evalRPN(char ** tokens, int tokensSize){ int stack[5000], i, top=0; for (i=0; i<tokensSize; i++){ if ( isdigit(tokens[i][0]) || strlen(tokens[i])> 阅读全文
posted @ 2020-12-24 14:40 温暖了寂寞 阅读(80) 评论(0) 推荐(0) 编辑
摘要: int findPeakElement(int* nums, int numsSize){ int l = 0, r = numsSize - 1; while (l < r) { int mid = (l + r) / 2; if (nums[mid] > nums[mid + 1]) r = m 阅读全文
posted @ 2020-12-24 12:22 温暖了寂寞 阅读(56) 评论(0) 推荐(0) 编辑
摘要: int findMin(int* nums, int numsSize){ if (numsSize==1) return *nums; int left=0, right=numsSize-1, mid; while(left<right){ mid=(left+right)/2; if(mid> 阅读全文
posted @ 2020-12-24 09:51 温暖了寂寞 阅读(45) 评论(0) 推荐(0) 编辑
摘要: char * reverseWords(char * s){ char* stack[100]; int pst = 0, len=strlen(s); char* retStr = (char*)calloc(len+1, sizeof(char)); char* temp; temp = str 阅读全文
posted @ 2020-12-23 23:36 温暖了寂寞 阅读(111) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 63 下一页