摘要: 题目描述 解法 双指针 class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { vector<int> res; int l = 0, r = nums.size() - 1; while(l < r) 阅读全文
posted @ 2023-03-09 19:50 盏茶 阅读(15) 评论(0) 推荐(0)
摘要: 题目描述 解法一 双指针法 class Solution { public: vector<int> exchange(vector<int>& nums) { int len = nums.size(); vector<int> res(len); int left = 0, right = le 阅读全文
posted @ 2023-03-09 19:04 盏茶 阅读(17) 评论(0) 推荐(0)