### LeetCode

22 已关注
160篇博文
• #### [LeetCode]228.Summary Ranges

题目Given a sorted integer array without duplicates, return the summary of its ranges.For example, giv...

2015-08-04 20:51
1307
• #### [LeetCode]230.Kth Smallest Element in a BST

题目Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.No...

2015-08-03 11:34
1276
• #### [LeetCode]231.Power of Two

题目Given an integer, write a function to determine if it is a power of two.

2015-08-02 09:53
1031
• #### [LeetCode]240.Search a 2D Matrix II

题目Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the fol...

2015-08-01 15:14
1090
• #### [LeetCode]232.Implement Queue using Stacks

题目Implement the following operations of a queue using stacks.push(x) – Push element x to the back of...

2015-08-01 08:55
1217
• #### [LeetCode]238.Product of Array Except Self

题目Given an array of n integers where n > 1, nums, return an array output such that output[i] is equa...

2015-07-31 16:45
1133
• #### [LeetCode]239.Sliding Window Maximum

题目Given an array nums, there is a sliding window of size k which is moving from the very left of the...

2015-07-19 15:49
1714
• #### [LeetCode]233.Number of Digit One

题目Given an integer n, count the total number of digit 1 appearing in all non-negative integers less ...

2015-07-19 10:53
2054
• #### [LeetCode]234.Palindrome Linked List

题目Given a singly linked list, determine if it is a palindrome.Follow up: Could you do it in O(n) ti...

2015-07-18 16:03
1434
• #### [LeetCode]235.Lowest Common Ancestor of a Binary Search Tree

题目Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the ...

2015-07-14 09:02
1420
• #### [LeetCode]236.Lowest Common Ancestor of a Binary Tree

题目Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.Accordin...

2015-07-13 16:43
1450
• #### [LeetCode]91.Decode Ways

A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' ...

2015-06-23 22:54
1897
• #### [LeetCode]65.Valid Number

Validate if a given string is numeric.Some examples: “0” => true ” 0.1 ” => true “abc” => false ...

2015-06-16 16:25
1916
• #### [LeetCode]93.Restore IP Addresses

题目Given a string containing only digits, restore it by returning all possible valid IP address combi...

2015-05-15 23:15
1750
• #### [LeetCode]*85.Maximal Rectangle

题目Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones a...

2015-05-14 20:48
1369
• #### [LeetCode]*84.Largest Rectangle in Histogram

题目Given n non-negative integers representing the histogram’s bar height where the width of each bar ...

2015-05-13 17:11
1636
• #### [LeetCode]139.Word Break

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separa...

2015-05-07 17:17
1764
• #### [LeetCode]151.Reverse Words in a String

题目Given an input string, reverse the string word by word.For example, Given s = “the sky is blue”, ...

2015-05-05 22:05
1486
• #### [LeetCode]203.Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –...

2015-05-02 08:43
1485
• #### [LeetCode]*106.Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree.Note: You may assume tha...

2015-05-01 19:35
1288