最新 最热

Leetcode 71 Simplify Path

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

2018-01-12
5

Leetcode 69 Sqrt(x)

Implement int sqrt(int x). Compute and return the square root of x. 求x的平方根。 二分没什么好说的,注意INT_MAX溢出的情况!class Solution {public: int mySqrt(int x) { ......

2018-01-12
3

Leetcode 94 Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree [1,null,2,3], 1 2 / 3 return [...

2018-01-12
18

Leetcode 92 Reverse Linked List II

Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->N...

2018-01-12
6

Leetcode 90 Subsets II

Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. F...

2018-01-12
18

Leetcode 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. For example, given the following matrix:...

2018-01-12
9

Leetcode 82 Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3...

2018-01-12
16

Leetcode 83 Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, ret...

2018-01-12
17

Leetcode 107 Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For example:...

2018-01-12
19

Leetcode 103 Binary Tree Zigzag Level Order Traversal

Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate...

2018-01-12
19