码迷,mamicode.com
首页 >  
搜索关键字:twosum    ( 457个结果
LeetCode 1. twoSums
C++:vector twoSum(vector& nums, int target) { unordered_map hashMap; for (int i = 0; i {hashMap[nums[i]]+1, i+1}; } ...
分类:其他好文   时间:2015-06-02 00:20:56    阅读次数:118
LeetCode之TwoSum
描述:        Given an array of integers, find two numbers such that they add up to a specific target number.        The function twoSum should return indices of the two numbers such that they add up t...
分类:其他好文   时间:2015-05-30 18:22:02    阅读次数:120
LeetCode 001_Two Sum Java
public class Solution { public int[] twoSum(int[] nums, int target) { int temp; boolean flag = false; int[] index = new int[2]; for(int i = 0; i < nums.length;...
分类:编程语言   时间:2015-05-29 23:18:15    阅读次数:168
Leetcode 1 Two Sum
Two Sum: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the...
分类:其他好文   时间:2015-05-27 13:57:02    阅读次数:161
01 two sum
class Solution {public: vector twoSum(vector& nums, int target) { maphash; build(nums,hash); int index2=0; vectorresult...
分类:其他好文   时间:2015-05-27 08:36:55    阅读次数:115
【leetcode】two sum --medium
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2015-05-24 20:14:08    阅读次数:116
[LeetCode][JavaScript]Two Sum
Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the...
分类:编程语言   时间:2015-05-24 01:18:37    阅读次数:216
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, where i...
分类:其他好文   时间:2015-05-20 22:22:28    阅读次数:127
1 Two Sum
public class Solution { public int[] twoSum(int[] nums, int target) { if (nums == null || nums.length hs = new HashMap();//用HashMap ...
分类:其他好文   时间:2015-05-20 16:20:51    阅读次数:93
1-Two sum 2-Add two numbers
1.Two sumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of t...
分类:其他好文   时间:2015-05-19 00:23:26    阅读次数:123
457条   上一页 1 ... 27 28 29 30 31 ... 46 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!