摘要: 同leetcode的21 address /** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ struct ListNode* mergeTw 阅读全文
posted @ 2021-01-20 21:26 RougeBW 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 同leetcode的53 address int maxSubArray(int* nums, int numsSize){ int sum[numsSize]; sum[0] = nums[0]; for(int i = 1; i<numsSize; i++){ sum[i] = sum[i-1] 阅读全文
posted @ 2021-01-20 21:10 RougeBW 阅读(24) 评论(0) 推荐(0) 编辑
摘要: address int findRepeatNumber(int* nums, int numsSize){ int a; int findone(int m){ int n = nums[m]; nums[m] = -1; while((n!=-1)&&(nums[n] != n)){ m = n 阅读全文
posted @ 2021-01-20 08:42 RougeBW 阅读(38) 评论(0) 推荐(0) 编辑