上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页
摘要: 1 public class BinarySearchSolution 2 { 3 public int BinarySearch(int[] array, int target) 4 { 5 int low = 0, high = array.Length; ... 阅读全文
posted @ 2017-12-28 14:32 逸朵 阅读(142) 评论(0) 推荐(0)
摘要: Given a string, find the length of the longest substring T that contains at most k distinct characters. For example, Given s = “eceba” and k = 2, T is 阅读全文
posted @ 2017-12-28 13:37 逸朵 阅读(131) 评论(0) 推荐(0)
摘要: Note:A subtree must include all of its descendants.Here's an example: The Largest BST Subtree in this case is the highlighted one. The return value is 阅读全文
posted @ 2017-12-28 09:55 逸朵 阅读(151) 评论(0) 推荐(0)
摘要: Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead. Note:The sum of 阅读全文
posted @ 2017-12-28 05:17 逸朵 阅读(461) 评论(0) 推荐(0)
摘要: Write a function to generate the generalized abbreviations of a word. Example: Given word = "word", return the following list (order does not matter): 阅读全文
posted @ 2017-12-28 04:30 逸朵 阅读(376) 评论(0) 推荐(0)
摘要: Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam 阅读全文
posted @ 2017-12-28 01:46 逸朵 阅读(304) 评论(0) 推荐(0)
摘要: Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any 阅读全文
posted @ 2017-12-20 06:56 逸朵 阅读(128) 评论(0) 推荐(0)
摘要: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2017-12-20 06:17 逸朵 阅读(162) 评论(0) 推荐(0)
摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successor in 阅读全文
posted @ 2017-12-20 05:36 逸朵 阅读(164) 评论(0) 推荐(0)
摘要: Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... For example, given nums = [3, 5, 2, 1, 6, 4], 阅读全文
posted @ 2017-12-20 04:59 逸朵 阅读(115) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页