原创 [Leetcode]Remove Invalid Parentheses

Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.

原创 [Leetcode]Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3},

原创 [Leetcode]Simplify Path

Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../.

原创 [cc150]Chapter 3 | Stacks and Queues

3.1Describe how you could use a single array to implement three stacks. 1)solution 1   divide the array to 3 part, so e

原创 [Leetcode]Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substri

原创 [Leetcode]Serialize and Deserialize Binary Tree

Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored

原创 [Leetcode]Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [

原创 [Leetcode]N-Queens II

Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solut

原创 [Leetcode]Range Sum Query - Immutable

Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nu

原创 [Leetcode]Find the Duplicate Number

Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least on

原创 [Leetcode]N-Queens

The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.

原创 [Leetcode]Divide Two Integers

Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. class

原创 [Leetcode]Additive Number

Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least

原创 [Leetcode]Spiral Matrix

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, G

原创 [Leetcode]Odd Even Linked List

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking ab