### leetcode

leetcode各个题目的思路解法和大神解法的介绍

1 已关注
234篇博文
• #### leetcode 514. Freedom Trail

In the video game Fallout 4(辐射4), the quest(追寻,探索) "Road to Freedom" requires players to reach a met...

2017-08-27 14:03
229
• #### leetcode 367. Valid Perfect Square

Given a positive integer num, write a function which returns True if num is a perfect square else Fa...

2017-08-27 15:12
107
• #### leetcode 459. Repeated Substring Pattern

Given a non-empty string check if it can be constructed by taking a substring of it and appending mu...

2017-08-27 17:11
129
• #### leetcode 488. Zuma Game(祖玛游戏)

Think about Zuma Game. You have a row of balls on the table, colored red(R), yellow(Y), blue(B), gre...

2017-08-28 15:55
238
• #### leetcode 501. Find Mode in Binary Search Tree

Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred...

2017-08-28 17:25
98
• #### leetcode 75. Sort Colors

Given an array with n objects colored red, white or blue, sort them so that objects of the same colo...

2017-08-29 13:37
93
• #### leetcode 313. Super Ugly Number

Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose al...

2017-08-29 17:33
92
• #### leetcode 110. Balanced Binary Tree

Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced bina...

2017-08-30 13:44
116
• #### leetcode 162. Find Peak Element

A peak element is an element that is greater than its neighbors. Given an input array where num[i] ...

2017-08-30 14:27
86
• #### leetcode 407. Trapping Rain Water II

Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevati...

2017-08-30 17:04
109
• #### leetcode 154. Find Minimum in Rotated Sorted Array II

Follow up for "Find Minimum in Rotated Sorted Array": What if duplicates are allowed? Would this aff...

2017-09-02 10:45
103
• #### leetcode 654. Maximum Binary Tree

Given an integer array with no duplicates. A maximum tree building on this array is defined as follo...

2017-09-02 19:32
325
• #### leetcode 657. Judge Route Circle

Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot m...

2017-09-02 20:18
225
• #### leetcode 655. Print Binary Tree

Print a binary tree in an m*n 2D string array following these rules: The row number m should be e...

2017-09-03 14:41
338
• #### leetcode 667. Beautiful Arrangement II

Given two integers n and k, you need to construct a list which contains n different positive intege...

2017-09-03 16:00
105
• #### leetcode 653. Two Sum IV - Input is a BST

Given a Binary Search Tree and a target number, return true if there exist two elements in the BST s...

2017-09-04 14:29
427
• #### leetcode 661. Image Smoother

Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother t...

2017-09-04 15:43
352
• #### leetcode 669. Trim a Binary Search Tree

Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that ...

2017-09-04 17:13
1066
• #### leetcode 650. 2 Keys Keyboard

Initially on a notepad only one character 'A' is present. You can perform two operations on this not...

2017-09-05 13:51
133
• #### leetcode 671. Second Minimum Node In a Binary Tree

Given a non-empty special binary tree consisting of nodes with the non-negative value, where each no...

2017-09-05 14:38
189