当前位置:   article > 正文

LeetCode All in One题解汇总(持续更新中...)

leetcode all in one

突然很想刷刷题,LeetCode是一个不错的选择,忽略了输入输出,更好的突出了算法,省去了不少时间。

dalao们发现了任何错误,或是代码无法通过,或是有更好的解法,或是有任何疑问和建议的话,可以在对应的随笔下面评论区留言,我会及时处理,在此谢过了。

过程或许会很漫长,也很痛苦,慢慢来吧。

编号题名过题率难度
1Two Sum0.376Easy
2Add Two Numbers0.285Medium
3Longest Substring Without Repeating Characters0.247Medium
4Median of Two Sorted Arrays0.229Hard
5Longest Palindromic Substring0.252Medium
6ZigZag Conversion0.272Medium
7Reverse Integer0.244Easy
8String to Integer (atoi)0.140Medium
9Palindrome Number0.357Easy
10Regular Expression Matching0.243Hard
11Container With Most Water0.371Medium
12Integer to Roman0.461Medium
13Roman to Integer0.478Easy
14Longest Common Prefix0.316Easy
153Sum0.218Medium
163Sum Closest0.316Medium
17Letter Combinations of a Phone Number0.363Medium
184Sum0.275Medium
19Remove Nth Node From End of List0.340Medium
20Valid Parentheses0.339Easy
21Merge Two Sorted Lists0.408Easy
22Generate Parentheses0.477Medium
23Merge k Sorted Lists0.280Hard
24Swap Nodes in Pairs0.390Medium
25Reverse Nodes in k-Group0.315Hard
26Remove Duplicates from Sorted Array0.362Easy
27Remove Element0.406Easy
28Implement strStr()0.289Easy
29Divide Two Integers0.158Medium
30Substring with Concatenation of All Words0.223Hard
31Next Permutation0.290Medium
32Longest Valid Parentheses0.232Hard
33Search in Rotated Sorted Array0.319Medium
34Search for a Range0.316Medium
35Search Insert Position0.400Easy
36Valid Sudoku0.374Medium
37Sudoku Solver0.319Hard
38Count and Say0.366Easy
39Combination Sum0.411Medium
40Combination Sum II0.357Medium
41First Missing Positive0.258Hard
42Trapping Rain Water0.375Hard
43Multiply Strings0.279Medium
44Wildcard Matching0.209Hard
45Jump Game II0.261Hard
46Permutations0.469Medium
47Permutations II0.348Medium
48Rotate Image0.415Medium
49Group Anagrams0.381Medium
50Pow(x, n)0.260Medium
51N-Queens0.331Hard
52N-Queens II0.466Hard
53Maximum Subarray0.402Easy
54Spiral Matrix0.271Medium
55Jump Game0.295Medium
56Merge Intervals0.318Medium
57Insert Interval0.289Hard
58Length of Last Word0.320Easy
59Spiral Matrix II0.409Medium
60Permutation Sequence0.294Medium
61Rotate List0.244Medium
62Unique Paths0.426Medium
63Unique Paths II0.321Medium
64Minimum Path Sum0.404Medium
65Valid Number0.129Hard
66Plus One0.396Easy
67Add Binary0.339Easy
68Text Justification0.199Hard
69Sqrt(x)0.288Easy
70Climbing Stairs0.411Easy
71Simplify Path0.262Medium
72Edit Distance0.325Hard
73Set Matrix Zeroes0.365Medium
74Search a 2D Matrix0.347Medium
75Sort Colors0.388Medium
76Minimum Window Substring0.267Hard
77Combinations0.411Medium
78Subsets0.443Medium
79Word Search0.280Medium
80Remove Duplicates from Sorted Array II0.367Medium
81Search in Rotated Sorted Array II0.327Medium
82Remove Duplicates from Sorted List II0.299Medium
83Remove Duplicates from Sorted List0.402Easy
84Largest Rectangle in Histogram0.275Hard
85Maximal Rectangle0.295Hard
86Partition List0.334Medium
87Scramble String0.297Hard
88Merge Sorted Array0.321Easy
89Gray Code0.423Medium
90Subsets II0.381Medium
91Decode Ways0.203Medium
92Reverse Linked List II0.313Medium
93Restore IP Addresses0.284Medium
94Binary Tree Inorder Traversal0.493Medium
95Unique Binary Search Trees II0.322Medium
96Unique Binary Search Trees0.418Medium
97Interleaving String0.251Hard
98Validate Binary Search Tree0.240Medium
99Recover Binary Search Tree0.309Hard
100Same Tree0.477Easy
101Symmetric Tree0.402Easy
102Binary Tree Level Order Traversal0.423Medium
103Binary Tree Zigzag Level Order Traversal0.366Medium
104Maximum Depth of Binary Tree0.545Easy
105Construct Binary Tree from Preorder and Inorder Traversal0.338Medium
106Construct Binary Tree from Inorder and Postorder Traversal0.333Medium
107Binary Tree Level Order Traversal II0.419Easy
108Convert Sorted Array to Binary Search Tree0.442Easy
109Convert Sorted List to Binary Search Tree0.355Medium
110Balanced Binary Tree0.383Easy
111Minimum Depth of Binary Tree0.335Easy
112Path Sum0.348Easy
113Path Sum II0.354Medium
114Flatten Binary Tree to Linked List0.364Medium
115Distinct Subsequences0.322Hard
116Populating Next Right Pointers in Each Node0.369Medium
117Populating Next Right Pointers in Each Node II0.339Medium
118Pascal's Triangle0.399Easy
119Pascal's Triangle II0.381Easy
120Triangle0.348Medium
121Best Time to Buy and Sell Stock0.428Easy
122Best Time to Buy and Sell Stock II0.478Easy
123Best Time to Buy and Sell Stock III0.303Hard
124Binary Tree Maximum Path Sum0.271Hard
125Valid Palindrome0.269Easy
126Word Ladder II0.148Hard
127Word Ladder0.200Medium
128Longest Consecutive Sequence0.381Hard
129Sum Root to Leaf Numbers0.376Medium
130Surrounded Regions0.195Medium
131Palindrome Partitioning0.354Medium
132Palindrome Partitioning II0.248Hard
133Clone Graph0.252Medium
134Gas Station0.299Medium
135Candy0.252Hard
136Single Number0.553Easy
137Single Number II0.426Medium
138Copy List with Random Pointer0.259Medium
139Word Break0.314Medium
140Word Break II0.244Hard
141Linked List Cycle0.351Easy
142Linked List Cycle II0.307Medium
143Reorder List0.267Medium
144Binary Tree Preorder Traversal0.466Medium
145Binary Tree Postorder Traversal0.419Hard
146LRU Cache0.196Hard
147Insertion Sort List0.338Medium
148Sort List0.297Medium
149Max Points on a Line0.152Hard
150Evaluate Reverse Polish Notation0.283Medium
151Reverse Words in a String0.156Medium
152Maximum Product Subarray0.267Medium
153Find Minimum in Rotated Sorted Array0.407Medium
154Find Minimum in Rotated Sorted Array II0.378Hard
155Min Stack0.309Easy
156Binary Tree Upside Down0.458Medium
157Read N Characters Given Read40.290Easy
158Read N Characters Given Read4 II - Call multiple times0.248Hard
159Longest Substring with At Most Two Distinct Characters0.427Hard
160Intersection of Two Linked Lists0.309Easy
161One Edit Distance0.317Medium
162Find Peak Element0.388Medium
163Missing Ranges0.233Medium
164Maximum Gap0.300Hard
165Compare Version Numbers0.207Medium
166Fraction to Recurring Decimal0.181Medium
167Two Sum II - Input array is sorted0.473Easy
168Excel Sheet Column Title0.272Easy
169Majority Element0.479Easy
170Two Sum III - Data structure design0.262Easy
171Excel Sheet Column Number0.484Easy
172Factorial Trailing Zeroes0.369Easy
173Binary Search Tree Iterator0.434Medium
174Dungeon Game0.241Hard
179Largest Number0.234Medium
186Reverse Words in a String II0.297Medium
187Repeated DNA Sequences0.329Medium
188Best Time to Buy and Sell Stock IV0.249Hard
189Rotate Array0.252Easy
190Reverse Bits0.294Easy
191Number of 1 Bits0.403Easy
198House Robber0.399Easy
199Binary Tree Right Side View0.423Medium
200Number of Islands0.364Medium
201Bitwise AND of Numbers Range0.344Medium
202Happy Number0.414Easy
203Remove Linked List Elements0.333Easy
204Count Primes0.265Easy
205Isomorphic Strings0.346Easy
206Reverse Linked List0.467Easy
207Course Schedule0.336Medium
208Implement Trie (Prefix Tree)0.306Medium
209Minimum Size Subarray Sum0.320Medium
210Course Schedule II0.300Medium
211Add and Search Word - Data structure design0.251Medium
212Word Search II0.246Hard
213House Robber II0.346Medium
214Shortest Palindrome0.251Hard
215Kth Largest Element in an Array0.405Medium
216Combination Sum III0.470Medium
217Contains Duplicate0.469Easy
218The Skyline Problem0.289Hard
219Contains Duplicate II0.328Easy
220Contains Duplicate III0.188Medium
221Maximal Square0.302Medium
222Count Complete Tree Nodes0.277Medium
223Rectangle Area0.337Medium
224Basic Calculator0.285Hard
225Implement Stack using Queues0.342Easy
226Invert Binary Tree0.531Easy
227Basic Calculator II0.300Medium
228Summary Ranges0.319Medium
229Majority Element II0.291Medium
230Kth Smallest Element in a BST0.452Medium
231Power of Two0.407Easy
232Implement Queue using Stacks0.380Easy
233Number of Digit One0.290Hard
234Palindrome Linked List0.334Easy
235Lowest Common Ancestor of a Binary Search Tree0.397Easy
236Lowest Common Ancestor of a Binary Tree0.300Medium
237Delete Node in a Linked List0.472Easy
238Product of Array Except Self0.503Medium
239Sliding Window Maximum0.341Hard
240Search a 2D Matrix II0.391Medium
241Different Ways to Add Parentheses0.459Medium
242Valid Anagram0.474Easy
243Shortest Word Distance0.534Easy
244Shortest Word Distance II0.410Medium
245Shortest Word Distance III0.512Medium
246Strobogrammatic Number0.403Easy
247Strobogrammatic Number II0.409Medium
248Strobogrammatic Number III0.327Hard
249Group Shifted Strings0.440Medium
250Count Univalue Subtrees0.438Medium
251Flatten 2D Vector0.413Medium
252Meeting Rooms0.488Easy
253Meeting Rooms II0.394Medium
254Factor Combinations0.439Medium
255Verify Preorder Sequence in Binary Search Tree0.409Medium
256Paint House0.462Easy
257Binary Tree Paths0.410Easy
258Add Digits0.518Easy
2593Sum Smaller0.420Medium
260Single Number III0.530Medium
261Graph Valid Tree0.384Medium
263Ugly Number0.396Easy
264Ugly Number II0.333Medium
265Paint House II0.384Hard
266Palindrome Permutation0.581Easy
267Palindrome Permutation II0.321Medium
268Missing Number0.449Easy
269Alien Dictionary0.261Hard
270Closest Binary Search Tree Value0.406Easy
271Encode and Decode Strings0.260Medium
272Closest Binary Search Tree Value II0.399Hard
273Integer to English Words0.227Hard
274H-Index0.337Medium
275H-Index II0.349Medium
276Paint Fence0.349Easy
277Find the Celebrity0.356Medium
278First Bad Version0.260Easy
279Perfect Squares0.377Medium
280Wiggle Sort0.585Medium
281Zigzag Iterator0.524Medium
282Expression Add Operators0.306Hard
283Move Zeroes0.514Easy
284Peeking Iterator0.356Medium
285Inorder Successor in BST0.357Medium
286Walls and Gates0.453Medium
287Find the Duplicate Number0.442Medium
288Unique Word Abbreviation0.178Medium
289Game of Life0.373Medium
290Word Pattern0.334Easy
291Word Pattern II0.385Hard
292Nim Game0.554Easy
293Flip Game0.571Easy
294Flip Game II0.469Medium
295Find Median from Data Stream0.292Hard
296Best Meeting Point0.524Hard
297Serialize and Deserialize Binary Tree0.348Hard
298Binary Tree Longest Consecutive Sequence0.417Medium
299Bulls and Cows0.358Medium
300Longest Increasing Subsequence0.389Medium
301Remove Invalid Parentheses0.359Hard
302Smallest Rectangle Enclosing Black Pixels0.466Hard
303Range Sum Query - Immutable0.319Easy
304Range Sum Query 2D - Immutable0.270Medium
305Number of Islands II0.396Hard
306Additive Number0.277Medium
307Range Sum Query - Mutable0.223Medium
308Range Sum Query 2D - Mutable0.256Hard
309Best Time to Buy and Sell Stock with Cooldown0.419Medium
310Minimum Height Trees0.290Medium
311Sparse Matrix Multiplication0.524Medium
312Burst Balloons0.437Hard
313Super Ugly Number0.383Medium
314Binary Tree Vertical Order Traversal0.379Medium
315Count of Smaller Numbers After Self0.350Hard
316Remove Duplicate Letters0.303Hard
317Shortest Distance from All Buildings0.348Hard
318Maximum Product of Word Lengths0.455Medium
319Bulb Switcher0.430Medium
320Generalized Abbreviation0.462Medium
321Create Maximum Number0.248Hard
322Coin Change0.266Medium
323Number of Connected Components in an Undirected Graph0.488Medium
324Wiggle Sort II0.264Medium
325Maximum Size Subarray Sum Equals k0.432Medium
326Power of Three0.407Easy
327Count of Range Sum0.306Hard
328Odd Even Linked List0.446Medium
329Longest Increasing Path in a Matrix0.374Hard
330Patching Array0.326Hard
331Verify Preorder Serialization of a Binary Tree0.370Medium
332Reconstruct Itinerary0.298Medium
333Largest BST Subtree0.310Medium
334Increasing Triplet Subsequence0.398Medium
335Self Crossing0.261Hard
336Palindrome Pairs0.271Hard
337House Robber III0.446Medium
338Counting Bits0.621Medium
339Nested List Weight Sum0.637Easy
340Longest Substring with At Most K Distinct Characters0.388Hard
341Flatten Nested List Iterator0.431Medium
342Power of Four0.390Easy
343Integer Break0.465Medium
344Reverse String0.602Easy
345Reverse Vowels of a String0.391Easy
346Moving Average from Data Stream0.601Easy
347Top K Frequent Elements0.495Medium
348Design Tic-Tac-Toe0.460Medium
349Intersection of Two Arrays0.481Easy
350Intersection of Two Arrays II0.445Easy
351Android Unlock Patterns0.446Medium
352Data Stream as Disjoint Intervals0.409Hard
353Design Snake Game0.272Medium
354Russian Doll Envelopes0.325Hard
355Design Twitter0.258Medium
356Line Reflection0.303Medium
357Count Numbers with Unique Digits0.461Medium
358Rearrange String k Distance Apart0.317Hard
359Logger Rate Limiter0.606Easy
360Sort Transformed Array0.449Medium
361Bomb Enemy0.401Medium
362Design Hit Counter0.552Medium
363Max Sum of Rectangle No Larger Than K0.337Hard
364Nested List Weight Sum II0.539Medium
365Water and Jug Problem0.280Medium
366Find Leaves of Binary Tree0.611Medium
367Valid Perfect Square0.386Easy
368Largest Divisible Subset0.339Medium
369Plus One Linked List0.551Medium
370Range Addition0.571Medium
371Sum of Two Integers0.509Easy
372Super Pow0.346Medium
373Find K Pairs with Smallest Sums0.312Medium
374Guess Number Higher or Lower0.365Easy
375Guess Number Higher or Lower II0.361Medium
376Wiggle Subsequence0.361Medium
377Combination Sum IV0.427Medium
378Kth Smallest Element in a Sorted Matrix0.455Medium
379Design Phone Directory0.358Medium
380Insert Delete GetRandom O(1)0.399Medium
381Insert Delete GetRandom O(1) - Duplicates allowed0.295Hard
382Linked List Random Node0.475Medium
383Ransom Note0.477Easy
384Shuffle an Array0.473Medium
385Mini Parser0.309Medium
386Lexicographical Numbers0.422Medium
387First Unique Character in a String0.472Easy
388Longest Absolute File Path0.372Medium
389Find the Difference0.512Easy
390Elimination Game0.427Medium
391Perfect Rectangle0.274Hard
392Is Subsequence0.447Medium
393UTF-8 Validation0.347Medium
394Decode String0.421Medium
395Longest Substring with At Least K Repeating Characters0.358Medium
396Rotate Function0.338Medium
397Integer Replacement0.305Medium
398Random Pick Index0.446Medium
399Evaluate Division0.423Medium
400Nth Digit0.302Easy
401Binary Watch0.448Easy
402Remove K Digits0.260Medium
403Frog Jump0.325Hard
404Sum of Left Leaves0.475Easy
405Convert a Number to Hexadecimal0.411Easy
406Queue Reconstruction by Height0.566Medium
407Trapping Rain Water II0.379Hard
408Valid Word Abbreviation0.283Easy
409Longest Palindrome0.458Easy
410Split Array Largest Sum0.393Hard
411Minimum Unique Word Abbreviation0.337Hard
412Fizz Buzz0.581Easy
413Arithmetic Slices0.546Medium
414Third Maximum Number0.280Easy
415Add Strings0.417Easy
416Partition Equal Subset Sum0.389Medium
417Pacific Atlantic Water Flow0.346Medium
418Sentence Screen Fitting0.281Medium
419Battleships in a Board0.629Medium
420Strong Password Checker0.200Hard
421Maximum XOR of Two Numbers in an Array0.479Medium
422Valid Word Square0.365Easy
423Reconstruct Original Digits from English0.446Medium
424Longest Repeating Character Replacement0.427Medium
425Word Squares0.431Hard
432All O`one Data Structure0.279Hard
434Number of Segments in a String0.367Easy
435Non-overlapping Intervals0.413Medium
436Find Right Interval0.415Medium
437Path Sum III0.401Easy
438Find All Anagrams in a String0.339Easy
439Ternary Expression Parser0.513Medium
440K-th Smallest in Lexicographical Order0.256Hard
441Arranging Coins0.363Easy
442Find All Duplicates in an Array0.567Medium
443String Compression0.363Easy
444Sequence Reconstruction0.196Medium
445Add Two Numbers II0.462Medium
446Arithmetic Slices II - Subsequence0.280Hard
447Number of Boomerangs0.465Easy
448Find All Numbers Disappeared in an Array0.512Easy
449Serialize and Deserialize BST0.429Medium
450Delete Node in a BST0.376Medium
451Sort Characters By Frequency0.517Medium
452Minimum Number of Arrows to Burst Balloons0.445Medium
453Minimum Moves to Equal Array Elements0.480Easy
4544Sum II0.477Medium
455Assign Cookies0.472Easy
456132 Pattern0.280Medium
459Repeated Substring Pattern0.381Easy
460LFU Cache0.250Hard
461Hamming Distance0.696Easy
462Minimum Moves to Equal Array Elements II0.519Medium
463Island Perimeter0.578Easy
464Can I Win0.252Medium
465Optimal Account Balancing0.390Hard
466Count The Repetitions0.273Hard
467Unique Substrings in Wraparound String0.332Medium
468Validate IP Address0.206Medium
469Convex Polygon0.342Medium
471Encode String with Shortest Length0.431Hard
472Concatenated Words0.308Hard
473Matchsticks to Square0.354Medium
474Ones and Zeroes0.389Medium
475Heaters0.297Easy
476Number Complement0.610Easy
477Total Hamming Distance0.477Medium
479Largest Palindrome Product0.254Easy
480Sliding Window Median0.307Hard
481Magical String0.458Medium
482License Key Formatting0.398Easy
483Smallest Good Base0.336Hard
484Find Permutation0.552Medium
485Max Consecutive Ones0.538Easy
486Predict the Winner0.452Medium
487Max Consecutive Ones II0.459Medium
488Zuma Game0.370Hard
490The Maze0.434Medium
491Increasing Subsequences0.388Medium
492Construct the Rectangle0.480Easy
493Reverse Pairs0.209Hard
494Target Sum0.438Medium
495Teemo Attacking0.515Medium
496Next Greater Element I0.565Easy
498Diagonal Traverse0.463Medium
499The Maze III0.338Hard
500Keyboard Row0.598Easy
501Find Mode in Binary Search Tree0.376Easy
502IPO0.365Hard
503Next Greater Element II0.480Medium
504Base 70.440Easy
505The Maze II0.387Medium
506Relative Ranks0.468Easy
507Perfect Number0.326Easy
508Most Frequent Subtree Sum0.523Medium
513Find Bottom Left Tree Value0.560Medium
514Freedom Trail0.391Hard
515Find Largest Value in Each Tree Row0.553Medium
516Longest Palindromic Subsequence0.428Medium
517Super Washing Machines0.363Hard
520Detect Capital0.519Easy
521Longest Uncommon Subsequence I0.557Easy
522Longest Uncommon Subsequence II0.320Medium
523Continuous Subarray Sum0.233Medium
524Longest Word in Dictionary through Deleting0.432Medium
525Contiguous Array0.414Medium
526Beautiful Arrangement0.533Medium
527Word Abbreviation0.441Hard
529Minesweeper0.494Medium
530Minimum Absolute Difference in BST0.472Easy
531Lonely Pixel I0.563Medium
532K-diff Pairs in an Array0.282Easy
533Lonely Pixel II0.450Medium
535Encode and Decode TinyURL0.739Medium
536Construct Binary Tree from String0.425Medium
537Complex Number Multiplication0.637Medium
538Convert BST to Greater Tree0.489Easy
539Minimum Time Difference0.460Medium
540Single Element in a Sorted Array0.559Medium
541Reverse String II0.438Easy
54201 Matrix0.329Medium
543Diameter of Binary Tree0.450Easy
544Output Contest Matches0.717Medium
545Boundary of Binary Tree0.325Medium
546Remove Boxes0.350Hard
547Friend Circles0.491Medium
548Split Array with Equal Sum0.377Medium
549Binary Tree Longest Consecutive Sequence II0.429Medium
551Student Attendance Record I0.445Easy
552Student Attendance Record II0.315Hard
553Optimal Division0.552Medium
554Brick Wall0.463Medium
555Split Concatenated Strings0.380Medium
556Next Greater Element III0.290Medium
557Reverse Words in a String III0.601Easy
560Subarray Sum Equals K0.402Medium
561Array Partition I0.664Easy
562Longest Line of Consecutive One in Matrix0.413Medium
563Binary Tree Tilt0.472Easy
564Find the Closest Palindrome0.175Hard
565Array Nesting0.494Medium
566Reshape the Matrix0.579Easy
567Permutation in String0.363Medium
568Maximum Vacation Days0.374Hard
572Subtree of Another Tree0.402Easy
573Squirrel Simulation0.523Medium
575Distribute Candies0.580Easy
576Out of Boundary Paths0.306Medium
581Shortest Unsorted Continuous Subarray0.291Easy
582Kill Process0.506Medium
583Delete Operation for Two Strings0.446Medium
587Erect the Fence0.333Hard
588Design In-Memory File System0.361Hard
591Tag Validator0.309Hard
592Fraction Addition and Subtraction0.461Medium
593Valid Square0.398Medium
594Longest Harmonious Subsequence0.411Easy
598Range Addition II0.481Easy
599Minimum Index Sum of Two Lists0.464Easy
600Non-negative Integers without Consecutive Ones0.317Hard
604Design Compressed String Iterator0.331Easy
605Can Place Flowers0.301Easy
606Construct String from Binary Tree0.497Easy
609Find Duplicate File in System0.522Medium
611Valid Triangle Number0.420Medium
616Add Bold Tag in String0.381Medium
617Merge Two Binary Trees0.673Easy
621Task Scheduler0.425Medium
623Add One Row to Tree0.461Medium
624Maximum Distance in Arrays0.351Easy
625Minimum Factorization0.312Medium
628Maximum Product of Three Numbers0.446Easy
629K Inverse Pairs Array0.270Hard
630Course Schedule III0.292Hard
631Design Excel Sum Formula0.279Hard
632Smallest Range0.421Hard
633Sum of Square Numbers0.323Easy
634Find the Derangement of An Array0.356Medium
635Design Log Storage System0.494Medium
636Exclusive Time of Functions0.446Medium
637Average of Levels in Binary Tree0.557Easy
638Shopping Offers0.448Medium
639Decode Ways II0.245Hard
640Solve the Equation0.387Medium
642Design Search Autocomplete System0.310Hard
643Maximum Average Subarray I0.375Easy
644Maximum Average Subarray II0.246Hard
645Set Mismatch0.397Easy
646Maximum Length of Pair Chain0.474Medium
647Palindromic Substrings0.550Medium
648Replace Words0.476Medium
649Dota2 Senate0.365Medium
6502 Keys Keyboard0.449Medium
6514 Keys Keyboard0.496Medium
652Find Duplicate Subtrees0.372Medium
653Two Sum IV - Input is a BST0.500Easy
654Maximum Binary Tree0.697Medium
655Print Binary Tree0.494Medium
656Coin Path0.257Hard
657Judge Route Circle0.684Easy
658Find K Closest Elements0.352Medium
659Split Array into Consecutive Subsequences0.369Medium
660Remove 90.493Hard
661Image Smoother0.461Easy
662Maximum Width of Binary Tree0.379Medium
663Equal Tree Partition0.366Medium
664Strange Printer0.337Hard
665Non-decreasing Array0.203Easy
666Path Sum IV0.503Medium
667Beautiful Arrangement II0.515Medium
668Kth Smallest Number in Multiplication Table0.398Hard
669Trim a Binary Search Tree0.582Easy
670Maximum Swap0.385Medium
671Second Minimum Node In a Binary Tree0.418Easy
672Bulb Switcher II0.493Medium
673Number of Longest Increasing Subsequence0.316Medium
674Longest Continuous Increasing Subsequence0.423Easy
675Cut Off Trees for Golf Event0.269Hard
676Implement Magic Dictionary0.494Medium
677Map Sum Pairs0.518Medium
678Valid Parenthesis String0.293Medium
67924 Game0.385Hard
680Valid Palindrome II0.323Easy
681Next Closest Time0.421Medium
682Baseball Game0.579Easy
683K Empty Slots0.349Hard
684Redundant Connection0.432Medium
685Redundant Connection II0.279Hard
686Repeated String Match0.326Easy
687Longest Univalue Path0.330Easy
688Knight Probability in Chessboard0.395Medium
689Maximum Sum of 3 Non-Overlapping Subarrays0.409Hard
690Employee Importance0.517Easy
691Stickers to Spell Word0.347Hard
692Top K Frequent Words0.412Medium
693Binary Number with Alternating Bits0.557Easy
694Number of Distinct Islands0.450Medium
695Max Area of Island0.517Easy
696Count Binary Substrings0.506Easy
697Degree of an Array0.468Easy
698Partition to K Equal Sum Subsets0.375Medium
699Falling Squares0.367Hard
711Number of Distinct Islands II0.416Hard
712Minimum ASCII Delete Sum for Two Strings0.512Medium
713Subarray Product Less Than K0.330Medium
714Best Time to Buy and Sell Stock with Transaction Fee0.451Medium
715Range Module0.318Hard
716Max Stack0.370Hard
7171-bit and 2-bit Characters0.495Easy
718Maximum Length of Repeated Subarray0.410Medium
719Find K-th Smallest Pair Distance0.271Hard
720Longest Word in Dictionary0.413Easy
721Accounts Merge0.325Medium
722Remove Comments0.279Medium
723Candy Crush0.552Medium
724Find Pivot Index0.395Easy
725Split Linked List in Parts0.474Medium
726Number of Atoms0.442Hard
727Minimum Window Subsequence0.311Hard
728Self Dividing Numbers0.667Easy
729My Calendar I0.422Medium
730Count Different Palindromic Subsequences0.352Hard
731My Calendar II0.373Medium
732My Calendar III0.510Hard
733Flood Fill0.478Easy
734Sentence Similarity0.386Easy
735Asteroid Collision0.372Medium
736Parse Lisp Expression0.431Hard
737Sentence Similarity II0.409Medium
738Monotone Increasing Digits0.413Medium
739Daily Temperatures0.527Medium
740Delete and Earn0.437Medium
741Cherry Pickup0.231Hard
742Closest Leaf in a Binary Tree0.334Medium
743Network Delay Time0.342Medium
744Find Smallest Letter Greater Than Target0.444Easy
745Prefix and Suffix Search0.248Hard
746Min Cost Climbing Stairs0.433Easy
747Largest Number At Least Twice of Others0.417Easy
748Shortest Completing Word0.525Medium
749Contain Virus0.388Hard
750Number Of Corner Rectangles0.526Medium
751IP to CIDR0.548Easy
752Open the Lock0.380Medium
753Cracking the Safe0.396Hard
754Reach a Number0.259Medium
755Pour Water0.337Medium
756Pyramid Transition Matrix0.451Medium
757Set Intersection Size At Least Two0.343Hard
758Bold Words in String0.371Easy
759Employee Free Time0.517Hard
760Find Anagram Mappings0.753Easy
761Special Binary String0.400Hard
762Prime Number of Set Bits in Binary Representation0.548Easy
763Partition Labels0.641Medium
764Largest Plus Sign0.362Medium
765Couples Holding Hands0.479Hard
766Toeplitz Matrix0.578Easy
767Reorganize String0.355Medium
768Max Chunks To Make Sorted II0.421Hard
769Max Chunks To Make Sorted0.473Medium
770Basic Calculator IV0.427Hard
771Jewels and Stones0.824Easy
772Basic Calculator III0.375Hard
773Sliding Puzzle0.470Hard
774Minimize Max Distance to Gas Station0.290Hard
775Global and Local Inversions0.310Medium
776Split BST0.485Medium
777Swap Adjacent in LR String0.262Medium
778Swim in Rising Water0.440Hard
779K-th Symbol in Grammar0.352Medium
780Reaching Points0.211Hard
781Rabbits in Forest0.487Medium
782Transform to Chessboard0.345Hard
783Minimum Distance Between BST Nodes0.471Easy
784Letter Case Permutation0.515Easy
785Is Graph Bipartite?0.384Medium
786K-th Smallest Prime Fraction0.284Hard
787Cheapest Flights Within K Stops0.310Medium
788Rotated Digits0.510Easy
789Escape The Ghosts0.452Medium
790Domino and Tromino Tiling0.315Medium
791Custom Sort String0.614Medium
792Number of Matching Subsequences0.335Medium
793Preimage Size of Factorial Zeroes Function0.485Hard
794Valid Tic-Tac-Toe State0.270Medium
795Number of Subarrays with Bounded Maximum0.387Medium
796Rotate String0.677Easy
797All Paths From Source to Target0.687Medium
798Smallest Rotation with Highest Score    New0.285Hard
799Champagne Tower    New0.272Medium

LeetCode All in One题解汇总(持续更新中...)

本文版权归作者AlvinZH和博客园所有,欢迎转载和商用,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.


转载于:https://www.cnblogs.com/AlvinZH/p/8534935.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/115985
推荐阅读
相关标签
  

闽ICP备14008679号