- 博客(2)
- 收藏
- 关注
原创 Leetcode 2 两数相加
Leetcode 2 两数相加 错误示范:将两链表转成两数,再相加,还要注意处理前导零。。 最后1565 / 1568 个通过测试用例,卡死在[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1] 错误原因:runtime error: signed integer overflow: 10 * 1000000000000000000 cannot be represented in type ‘long long’ (solution
2021-02-06 15:02:07
74
原创 Leetcode 1 两数之和
Leetcode 1 两数之和 class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { vector<int> ans; for(int i=0;i<=nums.size()-2;i++) for(int j=i+1;j<=nums.size()-1;j++)
2021-02-06 11:33:22
19
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人