
leetcode
文章平均质量分 63
大驰子在路上
这个作者很懒,什么都没留下…
展开
-
[LeetCode]Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array retur原创 2014-11-09 11:40:58 · 322 阅读 · 0 评论 -
[LeetCode]pow(double x,int n)解题报告
Implement pow(x, n).常见的方法有两种,yizhon原创 2014-11-09 10:11:48 · 921 阅读 · 0 评论 -
[Leetcode]Min stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get原创 2014-11-12 19:41:40 · 392 阅读 · 0 评论 -
[LeetCode]Valid Parenthese
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all va原创 2014-11-15 00:11:28 · 839 阅读 · 0 评论 -
[LeetCode] Sqrt(int x)解题报告之无限逼近(牛顿法)
Implement int sqrt(int x).Compute and return the square root of x.求一个数原创 2014-11-14 12:41:08 · 3082 阅读 · 2 评论 -
[LeetCode]sqrt(int x)解题报告之二分查找
这道题用二分法找平方根,这个想法很自然,不过要注意变量要定义成un原创 2014-11-14 20:35:14 · 616 阅读 · 0 评论 -
[LeetCode]Reverse Linked List II解题报告
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy the原创 2014-11-08 20:42:16 · 372 阅读 · 0 评论