###### LeetCode-从vector到map——在序列中寻找复合条件的组合

Given an array of integers, ﬁnd two numbers such that they add up to a speciﬁc target number.
The function twoSum should return indices of the two numbers such that they add up to the target,
where index1 must be less than index2. Please note that your returned answers (both index1 and index2)are not zero-based.
You may assume that each input would have exactly one solution.
Input: numbers={2, 7, 11, 15}, target=9
Output: index1=1, index2=2

//建立struct用于返回多个值
typedef struct NumIndex
{
int iNumIndex1 ;
int iNumIndex2 ;
}NumIndex;

class TwoSum
{
public:
NumIndex Sulotion(vector Num, int iLength, int iTarget)
{
int i;
int iBuf;
NumIndex Index;
//习惯性写法，算出结构体长度，虽然这个题里面没什么卵用
int iLong = sizeof(Index);
//初始化map映射
for (i=0;i

#### 使用find_if的自定义条件查找vector或map

2016-08-26 10:27:41

#### 顺序图组合片段类型及属性

2016-09-14 13:56:02

#### thinkphp复合WHERE查询的写法

2015-07-20 09:47:00

#### STL中map 和vector嵌套使用示例

2009-04-18 13:32:00

#### STL中vector和map的查找和删除

2007-12-26 10:56:00

#### 多项查询条件组合下的SQL语句生成

2006-05-25 19:38:00

#### C++ 容器 vector 删减和序列合并示例

2016-10-10 19:30:24

#### SQL查询之组合查询

2016-05-23 14:56:48

#### map和vector嵌套使用

2015-07-01 16:39:44

#### 求最大子序列

2015-08-10 10:59:05

## 不良信息举报

LeetCode-从vector到map——在序列中寻找复合条件的组合