Loading

摘要: 三数之和 排序 + 双指针 排序 一个循环,确定三个数中的一个 使用双指针,如果三数之和大于0,右指针左移(因为由小到大排序,所以左边的数要小于右边) vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> ans; 阅读全文
posted @ 2020-06-05 14:56 mayapony 阅读(90) 评论(0) 推荐(0) 编辑