shuaijiang's blog
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于

LeetCode House Robber2

DescriptionNote: This is an extension of House Robber. After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. T
9月 17 2015
#leetcode

LeetCode Construct Binary Tree from Inorder and Postorder Traversal

DescriptionGiven inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. The original problem is here. The original code is
9月 15 2015
#leetcode

LeetCode Construct Binary Tree from Preorder and Inorder Traversal

DescriptionGiven preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. The original problem is here. The original code is h
9月 15 2015
#leetcode

LeetCode Perfect Squares

DescriptionGiven a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n. For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n
9月 13 2015
#leetcode

LeetCode Longest Valid Parentheses

DescriptionGiven a string containing just the characters ‘(‘ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. For “(()”, the longest valid parentheses substring is “(
9月 9 2015
#leetcode

LeetCode First Bad Version

DescriptionYou are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed b
9月 8 2015
#leetcode

LeetCode Course Schedule

DescriptionThere are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is express
8月 31 2015
#leetcode

LeetCode Different Ways To Add Parentheses

DescriptionGiven a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *. Examp
8月 31 2015
#leetcode

LeetCode Ugly Number2

DescriptionWrite a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the
8月 30 2015
#leetcode

LeetCode Edit Distance

DescriptionGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on
8月 26 2015
#leetcode
1…45678…26

搜索

Hexo Fluid
总访问量 次 总访客数 人