摘要: int* findOrder(int numCourses, int** prerequisites, int prerequisitesSize, int* prerequisitesColSize, int* returnSize){ int** edges = (int**)calloc(nu 阅读全文
posted @ 2020-12-26 22:02 温暖了寂寞 阅读(81) 评论(0) 推荐(0) 编辑
摘要: int** edges; int* edgeColSize; int* visited; bool valid; void dfs(int u) { visited[u] = 1; for (int i = 0; i < edgeColSize[u]; ++i) { if (visited[edge 阅读全文
posted @ 2020-12-26 19:32 温暖了寂寞 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑