上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页

[leetcode]Divide Two Integers

摘要: Divide Two IntegersDivide two integers without using multiplication, division and mod operator.不用* 、/、%来做除法。只能加减了啊亲!算法思路:一个一个加上去必超时,例如dividend = Integ... 阅读全文
posted @ 2014-08-08 18:30 喵星人与汪星人 阅读(315) 评论(0) 推荐(0) 编辑

[leetcode]Regular Expression Matching

摘要: Regular Expression MatchingImplement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more o... 阅读全文
posted @ 2014-08-08 16:37 喵星人与汪星人 阅读(368) 评论(0) 推荐(0) 编辑

[leetcode]Median of Two Sorted Arrays

摘要: Median of Two Sorted ArraysThere are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run... 阅读全文
posted @ 2014-08-08 15:13 喵星人与汪星人 阅读(233) 评论(0) 推荐(0) 编辑

[leetcode]Container With Most Water

摘要: Container With Most WaterGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such t... 阅读全文
posted @ 2014-08-08 11:21 喵星人与汪星人 阅读(182) 评论(0) 推荐(0) 编辑

[leetcode]Trapping Rain Water

摘要: Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to tr... 阅读全文
posted @ 2014-08-08 11:07 喵星人与汪星人 阅读(145) 评论(0) 推荐(0) 编辑

[leetcode]Jump Game II

摘要: Jump Game IIGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents... 阅读全文
posted @ 2014-08-08 00:44 喵星人与汪星人 阅读(246) 评论(0) 推荐(0) 编辑

[leetcode]Jump Game

摘要: Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents yo... 阅读全文
posted @ 2014-08-08 00:29 喵星人与汪星人 阅读(247) 评论(0) 推荐(0) 编辑

[leetcode]Sqrt(x)

摘要: Sqrt(x)Implementint sqrt(int x).Compute and return the square root ofx.【注意】:1.本题int类型可能会溢出,因此不能用乘法运算,应尽量用除法。2. 绝大多数数字都不是可开方的,该如何得到比较近的结果呢?算法思路:思路1:顺序遍... 阅读全文
posted @ 2014-08-08 00:05 喵星人与汪星人 阅读(301) 评论(0) 推荐(0) 编辑

[leetcode]Flatten Binary Tree to Linked List

摘要: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / ... 阅读全文
posted @ 2014-08-07 22:53 喵星人与汪星人 阅读(210) 评论(0) 推荐(0) 编辑

[leetcode]Single Number II

摘要: Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a lin... 阅读全文
posted @ 2014-08-07 22:26 喵星人与汪星人 阅读(167) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页