上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2016-06-08 23:48 新一代的天皇巨星 阅读(188) 评论(0) 推荐(0)
摘要: 200. Number of Islands Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is forme 阅读全文
posted @ 2016-06-08 12:08 新一代的天皇巨星 阅读(170) 评论(0) 推荐(0)
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2016-06-06 08:19 新一代的天皇巨星 阅读(187) 评论(0) 推荐(0)
摘要: 231. Power ofTwo Given an integer, write a function to determine if it is a power of two. Hide Similar Problems (E) Number of 1 Bits (E) Power of Thre 阅读全文
posted @ 2016-06-05 14:21 新一代的天皇巨星 阅读(215) 评论(0) 推荐(0)
摘要: 280. Wiggle Sort Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... For example, given nums = [3 阅读全文
posted @ 2016-06-05 07:37 新一代的天皇巨星 阅读(1664) 评论(0) 推荐(0)
摘要: 215. Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, n 阅读全文
posted @ 2016-06-05 06:12 新一代的天皇巨星 阅读(519) 评论(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-06-03 14:09 新一代的天皇巨星 阅读(428) 评论(0) 推荐(0)
摘要: Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Return true if 阅读全文
posted @ 2016-06-03 13:51 新一代的天皇巨星 阅读(218) 评论(0) 推荐(0)
摘要: Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. Subscribe to s 阅读全文
posted @ 2016-05-30 08:19 新一代的天皇巨星 阅读(178) 评论(0) 推荐(0)
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2016-05-30 07:52 新一代的天皇巨星 阅读(107) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页