码迷,mamicode.com
首页 >  
搜索关键字:two pointer    ( 13796个结果
UVA 10986 Sending email(SPFA)
There are n SMTP servers connected by network cables. Each of the m cables connects two computers and has a certain latency measured in milliseconds required to send an email message. What is the sh...
分类:其他好文   时间:2014-08-11 21:25:02    阅读次数:384
HDU-3309-Roll The Cube(BFS)
Problem Description This is a simple game.The goal of the game is to roll two balls to two holes each. 'B' -- ball 'H' -- hole '.' -- land '*' -- wall Remember when a ball rolls into a hole, the...
分类:其他好文   时间:2014-08-11 21:22:12    阅读次数:308
leetcode -- Copy List with Random Pointer
你以为那是你的极限,也许只是别人的起点[问题描述]A linked list is given such that each node contains an additional random pointer which could point to any node in the list or...
分类:其他好文   时间:2014-08-11 21:15:12    阅读次数:182
[LeetCode]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 be O(log (m+n)). public class Solution { ...
分类:其他好文   时间:2014-08-11 15:14:12    阅读次数:188
POJ 3356 AGTC.
~~~~ 题目意思问将序列 x 转化成序列 y 需要多少步操作。 题目链接:http://poj.org/problem?id=3356 ~~~~ 我的想法先求的两条序列的最长公共子序列。余下不相同或者是缺少的部分做相应的处理就好。 最长公共子序列都会吧,于是···· #include #include #include #include #define N 1000+10 using...
分类:其他好文   时间:2014-08-11 12:02:32    阅读次数:238
Treblecross 博弈SG值
Treblecross is a two player game where the goal is to get threeXin a row on a one-dimensional board. At the start of the game all cells in the board a...
分类:其他好文   时间:2014-08-10 23:50:01    阅读次数:451
Hat’s Words(字典树)
Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the hat’s words in a dictionary....
分类:其他好文   时间:2014-08-10 18:40:10    阅读次数:232
uva 11234 - Expressions
Problem E: ExpressionsArithmetic expressions are usually written with the operators in between the two operands (which is called infix notation). For ...
分类:其他好文   时间:2014-08-10 18:22:40    阅读次数:362
Understanding node.js
Understanding node.jsPosted on 29/4/10 byFelix GeisendörferNode.jshas generally caused two reactions in people I've introduced it to. Basically people...
分类:Web程序   时间:2014-08-10 18:12:10    阅读次数:462
【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 digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Outpu...
分类:其他好文   时间:2014-08-10 13:08:30    阅读次数:296
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!