码迷,mamicode.com
首页 >  
搜索关键字:two points    ( 13225个结果
Two Sum leetcode java
题目: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 tw....
分类:编程语言   时间:2014-07-22 22:47:33    阅读次数:256
LeetCode "Max Points on a Line "
The first solution I figured out is O(n^3). I thought it must be O(n^2) to get max points on a line for a given point.. but after checking several art...
分类:其他好文   时间:2014-07-22 22:47:15    阅读次数:226
Codeforces #256 Div.2
B. Suffix Structure 1. 先判断s去掉一些元素是否能构成t,如果可以就是automaton 判断的方法也很简单,two pointer,相同元素同时++,不相同s的指针++,如果t能全找到,那么s能够去掉元素构成t。 bool f(string s, string t) { in...
分类:其他好文   时间:2014-07-22 22:44:54    阅读次数:139
【leetcode刷题笔记】Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".题解:简单的二进制加法模拟。a,b的最后以为对齐开始进行加法,用carries保存进位,如果加...
分类:其他好文   时间:2014-07-22 22:42:32    阅读次数:196
【leetcode刷题笔记】Edit Distance
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:其他好文   时间:2014-07-22 22:37:33    阅读次数:191
[leetcode]Combinations
CombinationsGiven two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3.....
分类:其他好文   时间:2014-07-22 22:36:54    阅读次数:153
Android中的ACCESS_MOCK_LOCATION权限使用Demo
The DDMS tool can be used to push out test location during testing. However, it has two serious limitations:DDMS sets location for GPS location provid...
分类:移动开发   时间:2014-07-22 22:34:35    阅读次数:915
poj1651Multiplication Puzzle(取数,区间DP)
Description The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of points ...
分类:其他好文   时间:2014-07-21 22:11:18    阅读次数:289
POJ 1845 Sumdiv
Sumdiv Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901). Input The only line...
分类:其他好文   时间:2014-07-21 16:27:12    阅读次数:187
LeetCode:Same Tree
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:其他好文   时间:2014-07-21 14:35:26    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!