1. 两数之和;暴力和哈希两种解法

https://leetcode-cn.com/problems/two-sum/

class Solution {
public:
    vector twoSum(vector& nums, int target) {
        vector res;
        for(int i=0;i
 unordered_map hash;
        for(int i=0;i

你可能感兴趣的:(算法)