上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 41 下一页
摘要: 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 or 阅读全文
posted @ 2016-08-06 22:26 冰凌花花~ 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 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 va 阅读全文
posted @ 2016-08-06 18:53 冰凌花花~ 阅读(292) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 分析: 给出两个字符串,查询第二个字符串是否在第 阅读全文
posted @ 2016-08-05 18:55 冰凌花花~ 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo 阅读全文
posted @ 2016-08-05 12:50 冰凌花花~ 阅读(127) 评论(1) 推荐(0) 编辑
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2016-08-02 12:44 冰凌花花~ 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of longest increasing subsequence. For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest inc 阅读全文
posted @ 2016-08-02 12:39 冰凌花花~ 阅读(574) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2, 阅读全文
posted @ 2016-08-02 11:28 冰凌花花~ 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For exam 阅读全文
posted @ 2016-07-29 12:33 冰凌花花~ 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2 阅读全文
posted @ 2016-07-28 14:57 冰凌花花~ 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2016-07-28 13:07 冰凌花花~ 阅读(126) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 41 下一页