![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
husthg
这个作者很懒,什么都没留下…
展开
-
Pow(x, n)
题目要求:代码实现原创 2014-10-23 23:34:46 · 448 阅读 · 0 评论 -
Find Minimum in Rotated Sorted Array
题目要求:代码实现:原创 2014-10-25 23:13:38 · 341 阅读 · 0 评论 -
Minimum Path Sum
题目要求:代码原创 2014-11-05 19:02:11 · 327 阅读 · 0 评论 -
Maximum Subarray
题目要求:代码:原创 2014-11-05 12:50:50 · 359 阅读 · 0 评论 -
Best Time to Buy and Sell Stock III
题目要求:思路:代码:原创 2014-11-04 23:30:40 · 347 阅读 · 0 评论 -
Search for a Range
题目要求:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If the target is原创 2014-10-23 21:21:08 · 443 阅读 · 0 评论 -
Best Time to Buy and Sell Stock II
题目要求:代码实现:原创 2014-10-27 18:27:06 · 302 阅读 · 0 评论 -
Maximum Product Subarray
题目要求:分析:代码实现:原创 2014-10-27 16:07:27 · 344 阅读 · 0 评论 -
Best Time to Buy and Sell Stock
题目要求:分析:代码实现:原创 2014-10-27 18:00:03 · 332 阅读 · 0 评论 -
Climbing Stairs
题目要求:代码实现1:原创 2014-10-27 17:03:11 · 307 阅读 · 0 评论 -
Reverse Words in a String
题目要求:思路:代码:原创 2014-10-27 12:50:16 · 441 阅读 · 0 评论 -
Find Minimum in Rotated Sorted Array II
题目要求:代码实现:原创 2014-10-25 23:54:42 · 349 阅读 · 0 评论 -
Divide Two Integers
题目要求:Divide Two Integers 代码实现:原创 2014-10-26 11:48:10 · 369 阅读 · 0 评论 -
Search a 2D Matrix
题目要求:代码实现:原创 2014-10-23 22:15:07 · 331 阅读 · 0 评论 -
Search Insert Position
题目要求:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in原创 2014-10-20 20:32:35 · 346 阅读 · 0 评论 -
Search in Rotated Sorted Array
题目要求:例子:原创 2014-10-20 21:14:30 · 320 阅读 · 0 评论 -
int sqrt(int x)
Implement int sqrt(int x).Compute and return the square root of x.1. 二分法:这道题一看到函数的定义int sqrt(int x)都是int就高兴了,直接二分吧。但是要注意,即使用long long都TM越界,还要用unsigned long long。最后返回值还要再检查一下。[cpp转载 2014-10-21 21:34:33 · 824 阅读 · 0 评论 -
Search in Rotated Sorted Array II
题目要求: 二分查找被旋转的有序数组,返回待查找数的位置,如果不存在待查找数便返回-1。例子: (i.e., 0 1 2 4 5 6 7 被旋转后为 4 5 6 7 0 1 2),查找0返回4。代码:原创 2014-10-21 21:04:46 · 379 阅读 · 0 评论 -
Delete Node in a Linked List(java)
题目要求:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third no原创 2016-03-07 13:36:09 · 309 阅读 · 0 评论