原创 97. Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given:s1 = "aabcc",s2 = "dbb
原创 102. 107.Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
原创 106. Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree. 分析: 中序是左中右,後序是左右中,構建一棵樹最重要的是找到其根節點,即中,因此以後
原创 101. Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binar
原创 99. Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Not
原创 152. Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For exampl
原创 85. Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. F
原创 153.154. Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0
原创 155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push eleme
原创 463. Island Perimeter
You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cel
原创 168. Excel Sheet Column Title
Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A
原创 179. Largest Number
Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30,
原创 132. Palindrome Partitioning II
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts neede
原创 172. Factorial Trailing Zeroes
Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time compl
原创 encoder-decoder
Encoder-decoder框架 Encoder-decoder框架最抽象的一種表示:即由一個句子生成另一個句子的通過處理模型。 對於句子對<x,y>,目標是給定輸入句子x,期待通過encoder-decoder框架生成目標句子y.