摘要: Problem: https://leetcode.com/problems/search-a-2d-matrix/ Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has 阅读全文
posted @ 2016-07-28 16:45 gavinXing 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/unique-binary-search-trees/ Given n, how many structurally unique BST's (binary search trees) that store values 阅读全文
posted @ 2016-07-19 16:32 gavinXing 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/largest-number/ Given a list of non negative integers, arrange them such that they form the largest number. For 阅读全文
posted @ 2016-07-16 13:23 gavinXing 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Problem :https://leetcode.com/problems/gas-station/ There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. Y 阅读全文
posted @ 2016-07-10 14:55 gavinXing 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/kth-largest-element-in-an-array/ Find the kth largest element in an unsorted array. Note that it is the kth lar 阅读全文
posted @ 2016-07-09 17:39 gavinXing 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/count-primes/ Count the number of prime numbers less than a non-negative number, n. Thought: SieveofEratosthene 阅读全文
posted @ 2016-07-09 16:36 gavinXing 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/jump-game/ Given an array of non-negative integers, you are initially positioned at the first index of the arra 阅读全文
posted @ 2016-07-05 19:12 gavinXing 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/word-break/ Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separ 阅读全文
posted @ 2016-07-03 19:17 gavinXing 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/combination-sum-iii/ Find all possible combinations of k numbers that add up to a number n, given that only num 阅读全文
posted @ 2016-07-02 23:50 gavinXing 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Problem: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ Say you have an array for which the ith element is the price of a given sto 阅读全文
posted @ 2016-06-28 17:21 gavinXing 阅读(168) 评论(0) 推荐(0) 编辑