https://leetcodechina.com/problems/two-sum/description/
map
class Solution {
public:
vector twoSum(vector& nums, int target) {
vector ans;
map vis;
for (int i = 0; i < nums.size()
原题网址:https://leetcode.com/problems/two-sum/
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input
英文描述
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the