### leetcode小白解题报告

leetcode解题报告

4 已关注
168篇博文
• #### leetcode No367. Valid Perfect Square

Question Given a positive integer num, write a function which returns True if num is a perfect squa...

2018-04-22 19:11
73
• #### leetcode No204. Count Primes

QuestionCount the number of prime numbers less than a non-negative number, n.Algorithm筛法求素数Accepted ...

2017-11-07 11:21
129
• #### leetcode No198. House Robber

QuestionYou are a professional robber planning to rob houses along a street. Each house has a certai...

2017-09-04 15:12
289
• #### leetcode No628. Maximum Product of Three Numbers

拼多多笔试题QuestionGiven an integer array, find three numbers whose product is maximum and output the max...

2017-08-02 11:05
340
• #### leetcode No56. Merge Intervals

QuestionGiven a collection of intervals, merge all overlapping intervals.For example, Given [1,3],[...

2017-07-27 17:53
269
• #### leetcode No486. Predict the Winner

QuestionGiven an array of scores that are non-negative integers. Player 1 picks one of the numbers f...

2017-07-19 22:46
395
• #### leetcode No135. Candy

QuestionThere are N children standing in a line. Each child is assigned a rating value.You are givin...

2017-07-12 16:12
373
• #### leetcode No76. Minimum Window Substring

QuestionGiven a string S and a string T, find the minimum window in S which will contain all the cha...

2017-07-06 20:48
443
• #### leetcode No150. Evaluate Reverse Polish Notation

QuestionEvaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators ar...

2017-07-05 10:19
273
• #### leetcode No115. Distinct Subsequences

QuestionGiven a string S and a string T, count the number of distinct subsequences of S which equals...

2017-06-29 21:12
532
• #### leetcode No146. LRU Cache

QuestionDesign and implement a data structure for Least Recently Used (LRU) cache. It should support...

2017-06-28 20:50
474
• #### leetcode No117. Populating Next Right Pointers in Each Node II

QuestionFollow up for problem “Populating Next Right Pointers in Each Node”.What if the given tree c...

2017-06-25 21:06
436
• #### leetcode No85. Maximal Rectangle

QuestionGiven a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only...

2017-06-23 21:25
533
• #### leetcode No99. Recover Binary Search Tree

QuestionTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without c...

2017-06-22 17:04
435
• #### leetcode No236. Lowest Common Ancestor of a Binary Tree

QuestionGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.Ac...

2017-06-22 15:24
514
• #### leetcode No44. Wildcard Matching

QuestionImplement wildcard pattern matching with support for ‘?’ and ‘*’.‘?’ Matches any single char...

2017-06-20 19:17
443
• #### leetcode No32. Longest Valid Parentheses

QuestionGiven a string containing just the characters ‘(’ and ‘)’, find the length of the longest va...

2017-06-14 21:27
513
• #### leetcode No72. Edit Distance

QuestionGiven two words word1 and word2, find the minimum number of steps required to convert word1 ...

2017-06-11 17:18
467
• #### leetcode No124. Binary Tree Maximum Path Sum

QuestionGiven a binary tree, find the maximum path sum.For this problem, a path is defined as any se...

2017-06-10 20:53
499
• #### leetcode No153. Find Minimum in Rotated Sorted Array

QuestionSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehan...

2017-05-29 22:32
473