摘要:
原题链接在这里:https://leetcode.com/problems/combinations/ 题目: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For
阅读全文
posted @ 2015-09-27 10:40
Dylan_Java_NYC
阅读(629)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/subsets-ii/ 题目: Given a collection of integers that might contain duplicates, nums, return all possible subsets.
阅读全文
posted @ 2015-09-27 10:02
Dylan_Java_NYC
阅读(353)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/subsets/ 题目: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solu
阅读全文
posted @ 2015-09-27 09:48
Dylan_Java_NYC
阅读(1262)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/rotate-image/ 题目: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockw
阅读全文
posted @ 2015-09-27 09:09
Dylan_Java_NYC
阅读(285)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/spiral-matrix-ii/ 题目: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral o
阅读全文
posted @ 2015-09-26 04:12
Dylan_Java_NYC
阅读(397)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/spiral-matrix/ 题目: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in sp
阅读全文
posted @ 2015-09-26 03:00
Dylan_Java_NYC
阅读(363)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/first-bad-version/ 题目: You are a product manager and currently leading a team to develop a new product. Unfortun
阅读全文
posted @ 2015-09-26 02:06
Dylan_Java_NYC
阅读(283)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/container-with-most-water/ 题目: Given n non-negative integers a1, a2, ..., an , where each represents a point at
阅读全文
posted @ 2015-09-26 01:47
Dylan_Java_NYC
阅读(271)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/move-zeroes/ 题目: Given an array nums, write a function to move all 0's to the end of it while maintaining the re
阅读全文
posted @ 2015-09-24 10:52
Dylan_Java_NYC
阅读(274)
推荐(0)
摘要:
原题链接在这里: https://leetcode.com/problems/jump-game-ii/ 题目: Given an array of non-negative integers, you are initially positioned at the first index of t
阅读全文
posted @ 2015-09-24 03:52
Dylan_Java_NYC
阅读(576)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/jump-game/ 题目: Given an array of non-negative integers, you are initially positioned at the first index of the a
阅读全文
posted @ 2015-09-24 02:52
Dylan_Java_NYC
阅读(276)
推荐(0)
摘要:
原题链接在这里: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]
阅读全文
posted @ 2015-09-24 02:33
Dylan_Java_NYC
阅读(273)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/reverse-bits/ 题目: Reverse bits of a given 32 bits unsigned integer. Example 1: Example 2: Note: Note that in som
阅读全文
posted @ 2015-09-23 23:32
Dylan_Java_NYC
阅读(336)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/number-of-1-bits/ 题目: Write a function that takes an unsigned integer and return the number of '1' bits it has (
阅读全文
posted @ 2015-09-22 04:56
Dylan_Java_NYC
阅读(391)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/dungeon-game/ 题目: The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a du
阅读全文
posted @ 2015-09-22 02:15
Dylan_Java_NYC
阅读(339)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/edit-distance/ 题目: Given two words word1 and word2, find the minimum number of steps required to convert word1 t
阅读全文
posted @ 2015-09-21 09:31
Dylan_Java_NYC
阅读(424)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/scramble-string/这道题参考了这篇帖子:http://blog.csdn.net/linhuanmars/article/details/24506703这其实是一道三维动态规划的题目,我们提出维护量res[i...
阅读全文
posted @ 2015-09-21 08:44
Dylan_Java_NYC
阅读(197)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/generate-parentheses/ 题目: Given n pairs of parentheses, write a function to generate all combinations of well-fo
阅读全文
posted @ 2015-09-21 07:15
Dylan_Java_NYC
阅读(245)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/reverse-words-in-a-string/ 题目: Given an input string, reverse the string word by word. For example,Given s = "th
阅读全文
posted @ 2015-09-21 04:42
Dylan_Java_NYC
阅读(271)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/simplify-path/ 题目: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", =>
阅读全文
posted @ 2015-09-21 04:11
Dylan_Java_NYC
阅读(244)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/implement-strstr/ 题目: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1
阅读全文
posted @ 2015-09-20 05:19
Dylan_Java_NYC
阅读(370)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/zigzag-conversion/ 题目: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like
阅读全文
posted @ 2015-09-20 00:31
Dylan_Java_NYC
阅读(300)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/length-of-last-word/ 题目: Given a string s consists of upper/lower-case alphabets and empty space characters ' ',
阅读全文
posted @ 2015-09-19 23:51
Dylan_Java_NYC
阅读(244)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/count-and-say/ 题目: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211,
阅读全文
posted @ 2015-09-18 11:32
Dylan_Java_NYC
阅读(372)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/longest-common-prefix/ 题目: Write a function to find the longest common prefix string amongst an array of strings
阅读全文
posted @ 2015-09-18 10:28
Dylan_Java_NYC
阅读(195)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/compare-version-numbers/ 题目: Compare two version numbers version1 and version2.If version1 > version2 return 1,
阅读全文
posted @ 2015-09-18 10:01
Dylan_Java_NYC
阅读(166)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/interleaving-string/ 题目: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example 1
阅读全文
posted @ 2015-09-18 05:46
Dylan_Java_NYC
阅读(226)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/distinct-subsequences/ 题目: Given a string S and a string T, count the number of distinct subsequences of S which
阅读全文
posted @ 2015-09-18 04:31
Dylan_Java_NYC
阅读(209)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/longest-valid-parentheses/ 题目: Given a string containing just the characters '(' and ')', find the length of the
阅读全文
posted @ 2015-09-17 23:24
Dylan_Java_NYC
阅读(367)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/maximal-rectangle/ 题目: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing o
阅读全文
posted @ 2015-09-17 22:55
Dylan_Java_NYC
阅读(487)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/largest-rectangle-in-histogram/description/ 题目: Given n non-negative integers representing the histogram's bar h
阅读全文
posted @ 2015-09-17 04:35
Dylan_Java_NYC
阅读(276)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/ 题目: Say you have an array for which the ith element is the price of a given
阅读全文
posted @ 2015-09-16 12:42
Dylan_Java_NYC
阅读(310)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/ 题目: Say you have an array for which the ith element is the price of a given
阅读全文
posted @ 2015-09-16 12:29
Dylan_Java_NYC
阅读(284)
推荐(0)
摘要:
原题链接在这里: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
阅读全文
posted @ 2015-09-16 02:27
Dylan_Java_NYC
阅读(208)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ 题目: Say you have an array for which the ith element is the price of a given sto
阅读全文
posted @ 2015-09-15 23:05
Dylan_Java_NYC
阅读(363)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/maximal-square/ 题目: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1'
阅读全文
posted @ 2015-09-15 22:41
Dylan_Java_NYC
阅读(292)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/maximum-product-subarray/ 题目: Find the contiguous subarray within an array (containing at least one number) whic
阅读全文
posted @ 2015-09-15 12:14
Dylan_Java_NYC
阅读(638)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/maximum-subarray/ 题目: Find the contiguous subarray within an array (containing at least one number) which has th
阅读全文
posted @ 2015-09-15 11:48
Dylan_Java_NYC
阅读(415)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/decode-ways/ 题目: A message containing letters from A-Z is being encoded to numbers using the following mapping:
阅读全文
posted @ 2015-09-15 07:37
Dylan_Java_NYC
阅读(384)
推荐(0)
摘要:
原题链接在这里:https://leetcode.com/problems/minimum-path-sum/ 题目: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom r
阅读全文
posted @ 2015-09-15 06:55
Dylan_Java_NYC
阅读(228)
推荐(0)