Leetcode 1.Two Sum
摘要:
暴力可过,复杂度达到了n^2 用map,复杂度为O(nlogn) //暴力版本class Solution {public: vector twoSum(vector& nums, int target) { vectoranswer; for(int i... 阅读全文
posted @ 2016-06-25 18:39 胖胖的乓乓 阅读(81) 评论(0) 推荐(0) 编辑
posted @ 2016-06-25 18:39 胖胖的乓乓 阅读(81) 评论(0) 推荐(0) 编辑
posted @ 2016-06-25 17:44 胖胖的乓乓 阅读(111) 评论(0) 推荐(0) 编辑