原创 [leetcode] Letter Combinations of a Phone Number

Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to

原创 [leetcode]set matrix zero

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 思路:我用了九章算法提供的算法,思路清晰簡潔。

原创 [leetcode]Largest Number

Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30

原创 [leetcode] Generate Parenthese

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example,

原创 [leetcode] Recover Binary Search Tree

Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. N

原创 [leetcode] Repeated DNA sequence

All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying

原创 [leetcode] Word Ladder

Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to e

原创 [leetcode] restore IP address

Given a string containing only digits, restore it by returning all possible valid IP address combinations. For exampl

原创 [leetcode] Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The lef

原创 [leetcode] Gray Code

The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative int

原创 [leetcode] Merge Intervals

Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], retu

原创 [leetcode] Container with most water

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines

原创 [leetcode] Populating Next Right Pointers in Each Node

Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkN

原创 [leetcode]Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this bina

原创 [leetcode] Jump Game I and II

Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element i