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

LeetCode Interleaving String

DescriptionGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = “aabcc”,s2 = “dbbca”, When s3 = “aadbbcbcac”, return true.When s3 = “aadbbbaccc”, return
9月 18 2015
#leetcode

LeetCode Shortest Palindrome

DescriptionGiven a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformation.
9月 18 2015
#leetcode

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
1…45678…26

搜索

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