摘要:        
原题链接在这里:https://leetcode.com/problems/find-k-pairs-with-smallest-sums/ 题目: You are given two integer arrays nums1 and nums2 sorted in ascending order     
阅读全文
 
        
        
            posted @ 2017-02-02 16:29
Dylan_Java_NYC
阅读(378)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/ 题目: Given a n x n matrix where each of the rows and columns are sorted     
阅读全文
 
        
        
            posted @ 2017-02-02 10:13
Dylan_Java_NYC
阅读(469)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/construct-the-rectangle/ 题目: For a web developer, it is very important to know how to design a web page's size.     
阅读全文
 
        
        
            posted @ 2017-02-02 03:44
Dylan_Java_NYC
阅读(314)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/palindrome-pairs/ 题目: Given a list of unique words, find all pairs of distinct indices (i, j) in the given list,    
阅读全文
 
        
        
            posted @ 2017-02-01 10:10
Dylan_Java_NYC
阅读(999)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/ 题目: Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤     
阅读全文
 
        
        
            posted @ 2017-02-01 08:41
Dylan_Java_NYC
阅读(520)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/number-of-boomerangs/ 题目: Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple o    
阅读全文
 
        
        
            posted @ 2017-01-31 09:27
Dylan_Java_NYC
阅读(322)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/max-consecutive-ones-ii/ 题目: Given a binary array, find the maximum number of consecutive 1s in this array if yo    
阅读全文
 
        
        
            posted @ 2017-01-31 08:20
Dylan_Java_NYC
阅读(683)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/max-consecutive-ones/ 题目: Given a binary array, find the maximum number of consecutive 1s in this array. Example    
阅读全文
 
        
        
            posted @ 2017-01-31 07:19
Dylan_Java_NYC
阅读(380)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/valid-perfect-square/ 题目: Given a positive integer num, write a function which returns True if num is a perfect     
阅读全文
 
        
        
            posted @ 2017-01-30 10:28
Dylan_Java_NYC
阅读(304)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/guess-number-higher-or-lower-ii/ 题目: We are playing the Guess Game. The game is as follows: I pick a number from    
阅读全文
 
        
        
            posted @ 2017-01-27 08:46
Dylan_Java_NYC
阅读(659)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/guess-number-higher-or-lower/ 题目: We are playing the Guess Game. The game is as follows: I pick a number from 1     
阅读全文
 
        
        
            posted @ 2017-01-26 09:29
Dylan_Java_NYC
阅读(313)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/word-pattern-ii/ 题目: Given a pattern and a string str, find if str follows the same pattern. Here follow means a    
阅读全文
 
        
        
            posted @ 2017-01-26 07:34
Dylan_Java_NYC
阅读(415)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/arranging-coins/ 题目: You have a total of n coins that you want to form in a staircase shape, where every k-th ro    
阅读全文
 
        
        
            posted @ 2017-01-25 15:09
Dylan_Java_NYC
阅读(272)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/valid-word-square/ 题目: Given a sequence of words, check whether it forms a valid word square. A sequence of word    
阅读全文
 
        
        
            posted @ 2017-01-25 08:05
Dylan_Java_NYC
阅读(655)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
什么时候使用DP: 动态规划题目的基本思路:    
阅读全文
 
        
        
            posted @ 2017-01-21 08:04
Dylan_Java_NYC
阅读(480)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/repeated-substring-pattern/ 题目: Given a non-empty string check if it can be constructed by taking a substring of    
阅读全文
 
        
        
            posted @ 2017-01-20 06:18
Dylan_Java_NYC
阅读(196)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/number-of-segments-in-a-string/ 题目: Count the number of segments in a string, where a segment is defined to be a    
阅读全文
 
        
        
            posted @ 2017-01-18 13:44
Dylan_Java_NYC
阅读(242)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/path-sum-iii/ 题目: You are given a binary tree in which each node contains an integer value. Find the number of p    
阅读全文
 
        
        
            posted @ 2017-01-17 15:25
Dylan_Java_NYC
阅读(407)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/assign-cookies/ 题目: Assume you are an awesome parent and want to give your children some cookies. But, you shoul    
阅读全文
 
        
        
            posted @ 2017-01-12 06:25
Dylan_Java_NYC
阅读(263)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/strobogrammatic-number-iii/ 题目: A strobogrammatic number is a number that looks the same when rotated 180 degree    
阅读全文
 
        
        
            posted @ 2017-01-11 14:03
Dylan_Java_NYC
阅读(518)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/integer-replacement/ 题目: Given a positive integer n and you can do operations as follow: What is the minimum num    
阅读全文
 
        
        
            posted @ 2017-01-11 12:51
Dylan_Java_NYC
阅读(207)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/convert-a-number-to-hexadecimal/ 题目: Given an integer, write an algorithm to convert it to hexadecimal. For nega    
阅读全文
 
        
        
            posted @ 2017-01-11 12:07
Dylan_Java_NYC
阅读(396)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/number-complement/ 题目: Given a positive integer, output its complement number. The complement strategy is to fli    
阅读全文
 
        
        
            posted @ 2017-01-11 09:23
Dylan_Java_NYC
阅读(441)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/binary-watch/ 题目: A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the b    
阅读全文
 
        
        
            posted @ 2017-01-10 15:10
Dylan_Java_NYC
阅读(300)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/majority-element-ii/ 题目: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times    
阅读全文
 
        
        
            posted @ 2017-01-10 08:46
Dylan_Java_NYC
阅读(274)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/anagrams/ 题目: Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate    
阅读全文
 
        
        
            posted @ 2017-01-09 14:45
Dylan_Java_NYC
阅读(443)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/longest-palindrome/ 题目: Given a string which consists of lowercase or uppercase letters, find the length of the     
阅读全文
 
        
        
            posted @ 2017-01-08 08:56
Dylan_Java_NYC
阅读(200)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/ransom-note/ 题目: Given an arbitrary ransom note string and another string containing letters from all the magazi    
阅读全文
 
        
        
            posted @ 2017-01-08 08:44
Dylan_Java_NYC
阅读(213)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/ 题目: Given a non-empty integer array, find the minimum number of moves     
阅读全文
 
        
        
            posted @ 2017-01-07 10:07
Dylan_Java_NYC
阅读(263)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/minimum-moves-to-equal-array-elements/ 题目: Given a non-empty integer array of size n, find the minimum number of    
阅读全文
 
        
        
            posted @ 2017-01-07 09:22
Dylan_Java_NYC
阅读(338)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/intersection-of-two-arrays-ii/ 题目: Given two arrays, write a function to compute their intersection. Example:Giv    
阅读全文
 
        
        
            posted @ 2017-01-06 10:10
Dylan_Java_NYC
阅读(222)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/intersection-of-two-arrays/ 题目: Given two arrays, write a function to compute their intersection. Example:Given     
阅读全文
 
        
        
            posted @ 2017-01-06 05:45
Dylan_Java_NYC
阅读(384)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/first-unique-character-in-a-string/ 题目: Given a string, find the first non-repeating character in it and return     
阅读全文
 
        
        
            posted @ 2017-01-05 13:52
Dylan_Java_NYC
阅读(270)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/sum-of-left-leaves/ 题目: Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 The    
阅读全文
 
        
        
            posted @ 2017-01-05 13:30
Dylan_Java_NYC
阅读(199)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/remove-element/ 题目: Given an array and a value, remove all instances of that value in place and return the new l    
阅读全文
 
        
        
            posted @ 2017-01-04 07:33
Dylan_Java_NYC
阅读(173)
推荐(0)
        
        
 
    
    
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/counting-bits/ 题目: Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calcula    
阅读全文
 
        
        
            posted @ 2017-01-02 09:03
Dylan_Java_NYC
阅读(321)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/total-hamming-distance/ 题目: The Hamming distance between two integers is the number of positions at which the co    
阅读全文
 
        
        
            posted @ 2017-01-02 08:36
Dylan_Java_NYC
阅读(372)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/hamming-distance/ 题目: The Hamming distance between two integers is the number of positions at which the correspo    
阅读全文
 
        
        
            posted @ 2017-01-02 08:08
Dylan_Java_NYC
阅读(302)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/find-all-duplicates-in-an-array/ 题目: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements    
阅读全文
 
        
        
            posted @ 2017-01-02 07:05
Dylan_Java_NYC
阅读(464)
推荐(0)
        
        
            
        
        
            
摘要:        
原题链接在这里:https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/ 题目: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array),    
阅读全文
 
        
        
            posted @ 2017-01-02 06:53
Dylan_Java_NYC
阅读(990)
推荐(0)