码迷,mamicode.com
首页 >  
搜索关键字:two pointers    ( 12138个结果
NBUT The Sum of F(x) and G(x)
问题描述 When Deathmoon played MC game, he faced a math problem. When he found a ancient tomb and came in, he found two polynomials f(x) and g(x) no the wall, only did he calculate f(x) + g(x) correctly ...
分类:其他好文   时间:2014-05-10 09:57:54    阅读次数:300
codechef Three Way Communications 题解
The Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry two-way transceivers so they can stay in constant contact. Of course, these transceivers have...
分类:其他好文   时间:2014-05-10 09:11:21    阅读次数:334
Leetcode | Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have t...
分类:其他好文   时间:2014-05-09 19:09:35    阅读次数:318
JavaScript中的两个等号(==)和三个等号(===)
JavaScript中的两个等号(==)和三个等号(===):Determining whether two variables are equivalent is one of the most important operations in programming.
分类:编程语言   时间:2014-05-09 11:44:17    阅读次数:579
CareerCup之1.3字符串去重
【题目】 原文: 1.3 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An extra copy of...
分类:其他好文   时间:2014-05-07 08:48:12    阅读次数:372
zoj 3781 Paint the Grid Reloaded (比较隐含的最短路)
Paint the Grid Reloaded Time Limit: 2 Seconds      Memory Limit: 65536 KB Leo has a grid with N rows and M columns. All cells are painted with either black or white initially. Two cells A ...
分类:其他好文   时间:2014-05-07 07:28:35    阅读次数:480
Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of gr...
分类:其他好文   时间:2014-05-07 06:10:17    阅读次数:370
【Leetcode】Two Sum
[Question] 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 t...
分类:其他好文   时间:2014-05-07 05:37:44    阅读次数:278
android Beam
Beaming NDEF Messages to Other Devices Android Beam allows simple peer-to-peer data exchange between two Android-powered devices. The application that wants to beam data to another device must be in ...
分类:移动开发   时间:2014-05-06 23:21:48    阅读次数:620
Leetcode: Two Sum
这道题看似简单,其实很坑爹啊,动不动就是Time Limit Exceeded, 比如我下面这段TLE的代码,我感觉方法是对的,但是too naive,算法复杂度到了O(N^2),自然就TLE了而且有一些小语法错误需要注意:for(runner=current+1;;)不能用>;一定所有的case都...
分类:其他好文   时间:2014-05-06 11:31:09    阅读次数:405
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!