摘要: 1 两数之和 直接n平方复杂度,双指针减少一层复杂度; 或者可以采用哈希表 class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { unordered_map<int, int> heap; for(i 阅读全文
posted @ 2020-12-20 12:47 herrhu 阅读(96) 评论(0) 推荐(0)