摘要: int cmp(const void* a, const void* b){//右侧排序,保证必定有重复的部分 //左侧排序的话,个人认为应该用降序 int *x1 = *(int **)a; int *x2 = *(int **)b; if(x1[1] > x2[1])return 1; else 阅读全文
posted @ 2021-11-29 21:45 冬日寻雾记 阅读(26) 评论(0) 推荐(0)
摘要: int canCompleteCircuit(int* gas, int gasSize, int* cost, int costSize){ int sum = 0, index = -1, total = 0; //sum记录总补给和油耗,index记录节点,total记录暂时的补给和油耗 fo 阅读全文
posted @ 2021-11-29 20:34 冬日寻雾记 阅读(30) 评论(0) 推荐(0)
摘要: int** levelOrder(struct TreeNode* root, int* returnSize, int** returnColumnSizes){ if(root == NULL){ *returnSize = 0; ** returnColumnSizes = NULL; ret 阅读全文
posted @ 2021-11-29 19:55 冬日寻雾记 阅读(43) 评论(0) 推荐(0)