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

LeetCode Word Ladder

DescriptionGiven two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from beginWord to endWord, such that: Only one letter can be changed at a tim
8月 13 2015
#leetcode

LeetCode Unqiue Binary Search Trees 2

DescriptionGiven n, generate all structurally unique BST’s (binary search trees) that store values 1…n. For example,Given n = 3, your program should return all 5 unique BST’s shown below. 1
8月 13 2015
#leetcode

LeetCode Palindrome Partitioning

DescriptionGiven a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = “aab”,Return [ [&quo
8月 13 2015
#leetcode

LeetCode Integer To Roman

DescriptionGiven an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. The original problem is here. The original code is here.
8月 13 2015
#leetcode

LeetCode Word Search

DescriptionGiven a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or ve
8月 12 2015
#leetcode

LeetCode Recover Binary Search Tree

DescriptionTwo elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. The original problem is here. The original code is here.
8月 12 2015
#leetcode

LeetCode Surrounded Regions

DescriptionGiven a 2D board containing ‘X’ and ‘O’, capture all regions surrounded by ‘X’. A region is captured by flipping all ‘O’s into ‘X’s in that surrounded region. For example, X X X X X O O X X
8月 12 2015
#leetcode

LeetCode Repeated DNA Sequences

DescriptionAll DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studying DNA, it is sometimes useful to identify repeated sequences within the
8月 10 2015
#leetcode

LeetCode Maximum Gap

DescriptionGiven an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 0 if the array contains less than 2 ele
8月 6 2015
#leetcode

LeetCode Maximal Square

DescriptionGiven a 2D binary matrix filled with 0’s and 1’s, find the largest square containing all 1’s and return its area. For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0
8月 5 2015
#leetcode
1…678910…26

搜索

Hexo Fluid
总访问量 次 总访客数 人
京ICP证123456号 | police-icon 京公网安备12345678号