摘要:        
原题链接在这里:https://leetcode.com/problems/missing-ranges/ 题目: Given a sorted integer array nums, where the range of elements are in the inclusive range [l    
阅读全文
 
        
        
            posted @ 2016-03-21 11:33
Dylan_Java_NYC
阅读(547)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/verify-preorder-serialization-of-a-binary-tree/ 题目: One way to serialize a binary tree is to use pre-order trave    
阅读全文
 
        
        
            posted @ 2016-03-21 10:44
Dylan_Java_NYC
阅读(309)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/patching-array/ 题目: Given a sorted positive integer array nums and an integer n, add/patch elements to the array    
阅读全文
 
        
        
            posted @ 2016-03-21 09:39
Dylan_Java_NYC
阅读(404)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/generalized-abbreviation/ 题目: Write a function to generate the generalized abbreviations of a word. Example: Giv    
阅读全文
 
        
        
            posted @ 2016-03-20 11:17
Dylan_Java_NYC
阅读(885)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/ 题目: Say you have an array for which the ith element is the price     
阅读全文
 
        
        
            posted @ 2016-03-17 01:28
Dylan_Java_NYC
阅读(327)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/alien-dictionary/ 题目: There is a new alien language which uses the latin alphabet. However, the order among lett    
阅读全文
 
        
        
            posted @ 2016-03-15 09:57
Dylan_Java_NYC
阅读(1015)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/3sum-smaller/ 题目: Given an array of n integers nums and a target, find the number of index triplets i, j, k with    
阅读全文
 
        
        
            posted @ 2016-03-11 14:15
Dylan_Java_NYC
阅读(390)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/palindrome-permutation-ii/ 题目: Given a string s, return all the palindromic permutations (without duplicates) of    
阅读全文
 
        
        
            posted @ 2016-03-11 13:51
Dylan_Java_NYC
阅读(528)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/palindrome-permutation/ 题目: Given a string, determine if a permutation of the string could form a palindrome. Fo    
阅读全文
 
        
        
            posted @ 2016-03-11 12:20
Dylan_Java_NYC
阅读(314)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
三种comments: 1 /* Test program */ 2 3 int main() 4 5 { 6 7 // variable declaration 8 9 int a, b, c; 10 11 /* This is a test 12 13 multiline 14 15 comme    
阅读全文
 
        
        
            posted @ 2016-03-09 09:47
Dylan_Java_NYC
阅读(214)
推荐(0)
        
        
            
        
        
            
摘要:        
以0.25为例, 0.25 * 100 = 25, 求25 和 100 的最大公约数gcd. 25/gcd 为分子. 100/gcd为分母. 与Fraction to Recurring Decimal类似.    
阅读全文
 
        
        
            posted @ 2016-03-09 07:31
Dylan_Java_NYC
阅读(1607)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/ 题目: Given n nodes labeled from 0 to n - 1 and a list of u    
阅读全文
 
        
        
            posted @ 2016-03-06 13:16
Dylan_Java_NYC
阅读(1117)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/reverse-words-in-a-string-ii/ 题目: Given an input string , reverse the string word by word. Example: Input: ["t",    
阅读全文
 
        
        
            posted @ 2016-03-06 03:35
Dylan_Java_NYC
阅读(341)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/range-sum-query-2d-mutable/ 题目: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defi    
阅读全文
 
        
        
            posted @ 2016-03-06 03:10
Dylan_Java_NYC
阅读(581)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/paint-fence/ 题目: There is a fence with n posts, each post can be painted with one of the k colors. You have to p    
阅读全文
 
        
        
            posted @ 2016-03-05 04:40
Dylan_Java_NYC
阅读(508)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/strobogrammatic-number-ii/ 题目: A strobogrammatic number is a number that looks the same when rotated 180 degrees    
阅读全文
 
        
        
            posted @ 2016-03-05 04:01
Dylan_Java_NYC
阅读(949)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/strobogrammatic-number/ 题目: A strobogrammatic number is a number that looks the same when rotated 180 degrees (l    
阅读全文
 
        
        
            posted @ 2016-03-05 02:33
Dylan_Java_NYC
阅读(297)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/zigzag-iterator/ 题目: Given two 1d vectors, implement an iterator to return their elements alternately. For examp    
阅读全文
 
        
        
            posted @ 2016-03-05 00:08
Dylan_Java_NYC
阅读(307)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/remove-duplicate-letters/ 题目: Given a string which contains only lowercase letters, remove duplicate letters so     
阅读全文
 
        
        
            posted @ 2016-03-04 12:33
Dylan_Java_NYC
阅读(333)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/encode-and-decode-strings/ 题目: Design an algorithm to encode a list of strings to a string. The encoded string i    
阅读全文
 
        
        
            posted @ 2016-03-04 09:37
Dylan_Java_NYC
阅读(470)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/ 题目: Given an array nums and a target value k, find the maximum length of a s    
阅读全文
 
        
        
            posted @ 2016-03-03 13:28
Dylan_Java_NYC
阅读(434)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/unique-word-abbreviation/ 题目: An abbreviation of a word follows the form <first letter><number><last letter>. Be    
阅读全文
 
        
        
            posted @ 2016-03-03 12:20
Dylan_Java_NYC
阅读(390)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/graph-valid-tree/ 题目: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair     
阅读全文
 
        
        
            posted @ 2016-03-03 11:27
Dylan_Java_NYC
阅读(732)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/super-ugly-number/ 题目: Write a program to find the nth super ugly number. Super ugly numbers are positive number    
阅读全文
 
        
        
            posted @ 2016-03-02 23:19
Dylan_Java_NYC
阅读(215)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/ 题目: Given a binary tree, find the length of the longest consecutive se    
阅读全文
 
        
        
            posted @ 2016-03-02 12:46
Dylan_Java_NYC
阅读(483)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/walls-and-gates/ 题目: You are given a m x n 2D grid initialized with these three possible values. -1 - A wall or     
阅读全文
 
        
        
            posted @ 2016-02-29 03:31
Dylan_Java_NYC
阅读(548)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/factor-combinations/ 题目: Numbers can be regarded as product of its factors. For example, Write a function that t    
阅读全文
 
        
        
            posted @ 2016-02-26 09:34
Dylan_Java_NYC
阅读(339)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/flatten-2d-vector/ 题目: Implement an iterator to flatten a 2d vector. Example: Input: 2d vector = [ [1,2], [3], [    
阅读全文
 
        
        
            posted @ 2016-02-25 11:48
Dylan_Java_NYC
阅读(669)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/group-shifted-strings/ 题目: Given a string, we can "shift" each of its letter to its successive letter, for examp    
阅读全文
 
        
        
            posted @ 2016-02-24 08:58
Dylan_Java_NYC
阅读(861)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/meeting-rooms-ii/ 题目: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2    
阅读全文
 
        
        
            posted @ 2016-02-22 11:51
Dylan_Java_NYC
阅读(810)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/meeting-rooms/ 题目: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],.    
阅读全文
 
        
        
            posted @ 2016-02-22 11:31
Dylan_Java_NYC
阅读(747)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/one-edit-distance/ 题目: Given two strings s and t, determine if they are both one edit distance apart. Note: Ther    
阅读全文
 
        
        
            posted @ 2016-02-22 07:24
Dylan_Java_NYC
阅读(409)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/binary-tree-upside-down/ 题目: Given a binary tree where all the right nodes are either leaf nodes with a sibling     
阅读全文
 
        
        
            posted @ 2016-02-22 04:30
Dylan_Java_NYC
阅读(583)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/binary-search-tree-iterator/ 题目: Implement an iterator over a binary search tree (BST). Your iterator will be in    
阅读全文
 
        
        
            posted @ 2016-02-22 02:55
Dylan_Java_NYC
阅读(280)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/inorder-successor-in-bst/ 题目: Given a binary search tree and a node in it, find the in-order successor of that n    
阅读全文
 
        
        
            posted @ 2016-02-22 02:24
Dylan_Java_NYC
阅读(616)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/number-of-islands-ii/ 题目: A 2d grid map of m rows and n columns is initially filled with water. We may perform a    
阅读全文
 
        
        
            posted @ 2016-02-21 09:05
Dylan_Java_NYC
阅读(734)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/closest-binary-search-tree-value-ii/ 题目: Given a non-empty binary search tree and a target value, find k values     
阅读全文
 
        
        
            posted @ 2016-02-21 03:45
Dylan_Java_NYC
阅读(947)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/closest-binary-search-tree-value/ 题目: Given a non-empty binary search tree and a target value, find the value in    
阅读全文
 
        
        
            posted @ 2016-02-21 02:10
Dylan_Java_NYC
阅读(641)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ 题目: Given an integer matrix, find the length of the longest increasing path    
阅读全文
 
        
        
            posted @ 2016-02-20 07:17
Dylan_Java_NYC
阅读(485)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:http://www.lintcode.com/en/problem/subtree/ You have two every large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes.    
阅读全文
 
        
        
            posted @ 2016-02-13 23:31
Dylan_Java_NYC
阅读(178)
推荐(0)