问题描述 Given an array of integers, return indices of the two numbers such that they add up to a specific target. 说是给一个integer数组nums,并给一个integer的值target, ...
分类:
其他好文 时间:
2016-06-27 01:25:50
阅读次数:
191
原题如下: 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 h ...
分类:
其他好文 时间:
2016-06-25 21:40:27
阅读次数:
130
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 ex ...
分类:
其他好文 时间:
2016-06-24 10:48:58
阅读次数:
160
问题描述: 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 h ...
分类:
其他好文 时间:
2016-06-24 10:47:07
阅读次数:
153
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 ex ...
分类:
其他好文 时间:
2016-06-22 23:29:26
阅读次数:
175
题目链接:http://www.lintcode.com/zh-cn/problem/two-sum/ 给一个整数数组,找到两个数使得他们的和等于一个给定的数target。 备份一份,然后排序。搞两个指针分别从左从右开始扫描,每次判断这两个数相加是不是符合题意,如果小了,那就把左边的指针向右移,同理 ...
分类:
编程语言 时间:
2016-06-18 23:45:42
阅读次数:
770
1、在fun.sh脚本里定义函数sum_two(功能是能够计算任意两个数相加的和)#!/bin/bash#yi=$1#er=$2if[-z$yi]||[-z$er];then echo数字不能为空ifsum_two(){#sum=`expr$yi+$er`sum=`expr$1+$2`#echo"$yi+$er=$sum"echo"$1+$2=$sum"}#sum_two$1$2sum_two$*或#!/bin/bashread-p"请输..
分类:
其他好文 时间:
2016-06-17 19:43:01
阅读次数:
230
1. 问题描述 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 ...
分类:
其他好文 时间:
2016-06-11 13:07:37
阅读次数:
132
[LeetCode] #1# Two Sum : 数组/哈希表/二分查找/双指针 ...
分类:
编程语言 时间:
2016-06-08 20:25:03
阅读次数:
453
Given an array of integers, find how many pairs in the array such that their sum is bigger than a specific target number. Please return the number of ...
分类:
其他好文 时间:
2016-06-06 16:42:07
阅读次数:
185