码迷,mamicode.com
首页 >  
搜索关键字:two pointer    ( 13796个结果
[leetcode]Two Sum @ Python
原题地址:http://oj.leetcode.com/problems/two-sum/题意:找出数组numbers中的两个数,它们的和为给定的一个数target,并返回这两个数的索引,注意这里的索引不是数组下标,而是数组下标加1。比如numbers={2,7,11,17}; target=9。那...
分类:编程语言   时间:2014-04-30 21:45:43    阅读次数:528
UVA 10891 Game of Sum(DP)
This is a two player game. Initially there areninteger numbers in an array and playersAandBget chance to take them alternatively. Each player can take...
分类:其他好文   时间:2014-04-30 20:34:38    阅读次数:519
something about basic usage of vector,queue
1.for a two dimension vector, we must assign at least the first dimension of the vector2.each dimension of an inner vector can be different3.if you do...
分类:其他好文   时间:2014-04-30 18:47:20    阅读次数:549
对失控指针引起的错误过程的准确观察
// Listing 8.9 - Demonstrates a stray pointer typedef unsigned short int USHORT;#include int main(){ USHORT * pInt = new USHORT; // 声明第一个指针,分配了一块...
分类:其他好文   时间:2014-04-29 18:46:01    阅读次数:470
POJ 3356 AGTC(DP-最小编辑距离)
DescriptionLetxandybe two strings over some finite alphabetA. We would like to transformxintoyallowing only operations given below:Deletion:a letter i...
分类:其他好文   时间:2014-04-29 16:22:00    阅读次数:450
Binary String Matching
Binary String Matching时间限制:3000ms | 内存限制:65535KB难度:3描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell ho...
分类:其他好文   时间:2014-04-29 15:02:00    阅读次数:564
《Cracking the Coding Interview》——第18章:难题——题目1
2014-04-29 00:56题目:不用算数运算,完成加法。解法:那就位运算吧,用加法器的做法就可以了。代码: 1 // 18.1 add two numbers wihout using arithmetic operator. 2 #include 3 using namespace std....
分类:其他好文   时间:2014-04-29 14:58:53    阅读次数:383
外观模式-分层架构,方便维护遗留下的大型的系统
public class Facade { /** * @param args 外观模式 */ One one; Two two; Three three; public Facade() { one=new One(); two=new Two(); three=new Three()...
分类:其他好文   时间:2014-04-29 11:15:47    阅读次数:238
LeetCode2:Median of Two Sorted Arrays
题目: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:其他好文   时间:2014-04-29 10:32:46    阅读次数:359
LeetCode——Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-04-29 10:17:46    阅读次数:406
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!