Giter Site home page Giter Site logo

liuyubobobo / play-leetcode Goto Github PK

View Code? Open in Web Editor NEW
2.7K 121.0 713.0 5.71 MB

My Solutions to Leetcode problems. All solutions support C++ language, some support Java and Python. Multiple solutions will be given by most problems. Enjoy:) 我的Leetcode解答。所有的问题都支持C++语言,一部分问题支持Java语言。近乎所有问题都会提供多个算法解决。大家加油!:)

CMake 5.45% C++ 90.02% Java 4.08% Python 0.44%
algorithms algorithm-challenges algorithm-competitions interview-questions leetcode-solutions leetcode-cpp

play-leetcode's Introduction

My solutions to Leetcode

I will put my solutions to Leetcode Problems in this repo. Every problem will be solved in C++; part of the problems will be solved in Java also. I will try my best to support more language in the future :)

Please feel free to contact me if you have any questions with this repo:)

email: [email protected]


大家好,欢迎大家来到我的 Leetcode 算法题解代码仓。在这个代码仓中,近乎每一个问题都会使用多种方式进行解决,同时标注了简明的算法**,时间复杂度和空间复杂度。所有问题都会使用C++进行解决,各别问题支持Java语言和Python语言。

如果对代码仓有任何问题,欢迎联系我:)

电子邮件[email protected]

知乎: 刘宇波 http://www.zhihu.com/people/liuyubobobo

知乎专栏:是不是很酷 https://zhuanlan.zhihu.com/liuyubobobo

个人公众号:是不是很酷:)

QRCode

知识星球(免费)

zsxq


其他相关代码仓

Problems

ID Problem Official
Solution
C++ Java Python
001 Two Sum solution C++ Java
002 Add Two Numbers solution C++
003 Longest Substring Without Repeating Characters solution C++ Java
004 Median of Two Sorted Arrays solution C++ Java
005 Longest Palindromic Substring solution C++
006 Zigzag Conversion solution C++
007 Reverse Integer solution C++
008 String to Integer (atoi) solution C++
010 Regular Expression Matching solution C++
011 Container With Most Water solution C++
012 Integer to Roman [无] C++
013 Roman to Integer [无] C++
014 Longest Common Prefix [无] C++
015 3Sum [无] C++
016 3Sum Closest [无] C++
017 Letter Combinations of a Phone Number solution C++ Java
018 4Sum [无] C++
019 Remove Nth Node From End of List solution C++ Java
020 Valid Parentheses solution C++ Java
021 Merge Two Sorted Lists solution C++
022 Generate Parentheses solution C++ Java Python
023 Merge k Sorted Lists solution C++
024 Swap Nodes in Pairs [无] C++ Java
025 Reverse Nodes in k-Group [无] C++
026 Remove Duplicates from Sorted Array solution C++
027 Remove Element solution C++
028 Implement strStr() [无]
[缺:完整BM算法, 其他模式匹配算法]
C++
029 Divide Two Integers solution
[缺:不使用乘法加法除法]
C++
030 Substring with Concatenation of All Words solution C++
031 Next Permutation solution C++
033 Search in Rotated Sorted Array solution C++
034 Search for a Range solution C++
035 Search Insert Position solution C++
036 Valid Sudoku solution C++
037 Sudoku Solver solution
[缺:Dancing Links]
C++ C++
038 Count and Say [无] C++
039 Combination Sum [无] C++
040 Combination Sum II [无] C++
041 First Missing Positive solution C++
042 Trapping Rain Water solution C++
043 Multiply Strings solution C++
045 Jump Game II solution C++
046 Permutations solution
[缺:排列算法整理]
C++ Java
047 Permutations II [无] C++
048 Rotate Image solution C++
049 Group Anagrams solution C++
050 Pow(x, n) [无] C++
051 N-Queens [缺:N皇后问题整理] C++ Java
052 N-Queens II solution
[缺:N皇后问题整理]
C++
053 Maximum Subarray solution C++
054 Spiral Matrix solution C++
055 Jump Game solution C++
056 Merge Intervals solution C++
057 Insert Interval solution C++
058 Length of Last Word solution C++
059 Spiral Matrix II [无] C++
061 Rotate List solution C++
062 Unique Paths [无]
[缺:数学解]
C++
063 Unique Paths II solution C++
064 Minimum Path Sum solution C++ Java Python
065 Valid Number solution C++
066 Plus One [无] C++
067 Add Binary [无] C++
068 Text Justification [无] C++
069 Sqrt(x) [无] C++
070 Climbing Stairs solution C++ Java
071 Simplify Path [无] C++
072 Edit Distance solution C++
073 Set Matrix Zeroes solution C++
074 Search a 2D Matrix [无] C++
075 Sort Colors solution C++ Java Python
076 Minimum Window Substring solution C++
077 Combinations solution C++ Java
078 Subsets solution C++
079 Word Search [无] C++ Java
080 Remove Duplicates from Sorted Array II [无] C++
081 Search in Rotated Sorted Array II solution C++
082 Remove Duplicates from Sorted List II [无] C++
083 Remove Duplicates from Sorted List [无] C++
084 Largest Rectangle in Histogram solution 题解 C++
085 Maximal Rectangle solution C++
086 Partition List solution C++
087 Scramble String [无] C++
088 Merge Sorted Array solution C++ Java
089 Gray Code [无] C++
090 Subsets II [无] C++
091 Decode Ways [无] C++
092 Reverse Linked List II solution C++
093 Restore IP Addresses solution C++
094 Binary Tree Inorder Traversal solution C++ Java
095 Unique Binary Search Trees II solution C++
096 Unique Binary Search Trees solution C++
097 Interleaving String solution
[缺:DP]
C++
098 Validate Binary Search Tree solution C++ Java
099 Recover Binary Search Tree [无] Java
100 Same Tree solution C++
101 Symmetric Tree solution C++ Python
102 Binary Tree Level Order Traversal solution C++ Java
103 Binary Tree Zigzag Level Order Traversal [无] C++
104 Maximum Depth of Binary Tree solution C++ Java
105 Construct Binary Tree from Preorder and Inorder Traversal solution C++
106 Construct Binary Tree from Inorder and Postorder Traversal [无] C++
107 Binary Tree Level Order Traversal II [无] C++
108 Convert Sorted Array to Binary Search Tree [无] C++
109 Convert Sorted List to Binary Search Tree solution C++
110 Balanced Binary Tree solution C++
111 Minimum Depth of Binary Tree solution C++
112 Path Sum solution C++ Java
113 Path Sum II [无] C++
114 Flatten Binary Tree to Linked List solution C++
115 Distinct Subsequences [无] C++ Java
116 Populating Next Right Pointers in Each Node [无] C++
117 Populating Next Right Pointers in Each Node II [无] C++
118 Pascal's Triangle solution C++
119 Pascal's Triangle II [无] C++
120 Triangle [无] C++
121 Best Time to Buy and Sell Stock C++
122 Best Time to Buy and Sell Stock II solution C++
123 Best Time to Buy and Sell Stock III C++
124 Binary Tree Maximum Path Sum solution C++
125 Valid Palindrome [无] C++
126 Word Ladder II [无]
[缺:双端搜索]
C++
127 Word Ladder solution C++ Java
128 Longest Consecutive Sequence C++
129 Sum Root to Leaf Numbers [无] C++
130 Surrounded Regions [无] C++
131 Palindrome Partitioning solution
[缺:DP]
C++
132 Palindrome Partitioning II [无] C++
133 Clone Graph [无] C++
134 Gas Station solution C++
135 Candy solution
[缺:O(1)空间算法]
C++
136 Single Number solution C++
137 Single Number II solution C++
138 Copy List with Random Pointer solution C++
139 Word Break solution C++
141 Linked List Cycle solution C++
142 Linked List Cycle II solution C++
143 Reorder List [无] C++
144 Binary Tree Preorder Traversal solution C++ Java
145 Binary Tree Postorder Traversal solution C++ Java
146 LRU Cache solution
[缺:封装一个Double Linked List]
C++
147 Insertion Sort List [无] C++
148 Sort List [无] C++
149 Max Points on a Line solution C++
150 Evaluate Reverse Polish Notation [无] C++
151 Reverse Words in a String [无] C++
152 Maximum Product Subarray solution
[缺:Linear]
C++ Python
153 Find Minimum in Rotated Sorted Array solution C++
155 Min Stack [无] C++
159 Longest Substring with At Most Two Distinct Characters solution C++
160 Intersection of Two Linked Lists solution C++
161 One Edit Distance solution C++
162 Find Peak Element solution C++
163 Missing Ranges solution C++
164 Maximum Gap solution
[缺:桶排序]
C++
165 Compare Version Numbers solution C++
166 Fraction to Recurring Decimal solution C++
167 Two Sum II - Input array is sorted solution C++ Java
168 Excel Sheet Column Title [无] C++
169 Majority Element solution C++ Python
170 Two Sum III - Data structure design [无] C++
171 Excel Sheet Column Number [无] C++
172 Factorial Trailing Zeroes solution C++
173 Binary Search Tree Iterator [无]
[缺:Morris遍历]
C++
174 Dungeon Game solution C++
175 Database Problem: Link - - - -
176 Database Problem: Link - - - -
179 Largest Number [无] C++
181 Database Problem: Link - - - -
184 Database Problem: Link - - - -
186 Reverse Words in a String II [无] C++
188 Best-Time-to-Buy-and-Sell-Stock-IV C++
189 Rotate Array solution C++
190 Reverse Bits solution C++
191 Number of 1 Bits solution C++
196 Database Problem: Link - - - -
197 Database Problem: Link - - - -
198 House Robber solution C++ Java
199 Binary Tree Right Side View solution C++
200 Number of Islands solution C++ Java
201 Bitwise AND of Numbers Range solution C++
202 Happy Number solution C++
203 Remove Linked List Elements [无] C++ Java
204 Count Primes [无] C++
205 Isomorphic Strings [无] C++
206 Reverse Linked List solution C++ Java
207 Course Schedule [无] C++
208 Implement Trie (Prefix Tree) solution C++
209 Minimum Size Subarray Sum solution C++ Java
210 Course Schedule II solution C++
211 Add and Search Word - Data structure design [无] C++ Java
212 Word Search II [无] C++
213 House Robber II [无] C++
215 Kth Largest Element in an Array solution C++
216 Combination Sum III [无] C++
217 Contains Duplicate [无] C++
218 The Skyline Problem C++
219 Contains Duplicate II solution C++ Java
220 Contains Duplicate III solution C++ Java
221 Maximal Square solution C++ Python
222 Count Complete Tree Nodes [无] C++
223 Rectangle Area [无] C++
224 Basic Calculator [无] C++
225 Implement Stack using Queues solution C++
226 Invert Binary Tree solution C++ Java Python
227 Basic Calculator II [无] C++
228 Summary Ranges solution C++
229 Majority Element II solution
[缺:BM Voting]
C++
230 Kth Smallest Element in a BST solution
[缺:非递归]
C++
231 Power of Two solution C++
232 Implement Queue using Stacks solution C++
233 Number of Digit One solution
[缺:数学方法]
C++
234 Palindrome Linked List [无] C++
235 Lowest Common Ancestor of a Binary Search Tree solution C++ Java
236 Lowest Common Ancestor of a Binary Tree solution
[缺:非递归解法;LCA问题总结]
C++
237 Delete Node in a Linked List solution C++ Java
238 Product of Array Except Self solution C++ Python
239 Sliding Window Maximum solution C++
240 Search a 2D Matrix II solution
[缺:分治]
C++
241 Different Ways to Add Parentheses [无] C++
242 Valid Anagram solution C++
243 Shortest Word Distance solution C++
244 Shortest Word Distance II solution C++
245 Shortest Word Distance III [无] C++
246 Strobogrammatic Number solution C++
247 Strobogrammatic Number II [无] C++
248 Strobogrammatic Number III [无] C++
249 Group Shifted Strings [无] C++
250 Count Univalue Subtrees solution C++
251 Flatten 2D Vector solution C++
252 Meeting Rooms solution C++
253 Meeting Rooms II solution C++
254 Factor Combinations [无] C++
256 Paint House [无] C++
257 Binary Tree Paths solution C++ Java
258 Add Digits solution C++
259 3Sum Smaller solution C++
260 Single Number III solution C++
261 Graph Valid Tree C++
263 Ugly Number [无] C++
264 Ugly Number II solution C++
265 Paint House II C++
266 Palindrome Permutation solution C++
267 Palindrome Permutation II solution C++
268 Missing Number solution C++
269 Alien Dictionary solution C++
273 Integer to English Words solution C++
274 H-Index solution
[缺:非二分]
C++
275 H-Index II solution C++
276 Paint Fence solution C++
277 Find the Celebrity solution
[缺:O(n) 解法]
C++
278 First Bad Version solution C++
279 Perfect Squares [无]
四平方和数学解
C++ Java
280 Wiggle Sort solution C++
282 Expression Add Operators solution C++
283 Move Zeroes solution C++ Java
284 Peeking Iterator solution C++
285 Inorder Successor in BST [无]
[缺:空间O(h)]
C++
286 Walls and Gates solution C++
287 Find the Duplicate Number C++
288 Unique Word Abbreviation solution C++
289 Game of Life solution C++
290 Word Pattern [无] C++
292 Nim Game solution C++
295 Find Median from Data Stream [无] C++
296 Best Meeting Point solution C++
297 Serialize and Deserialize Binary Tree solution C++
298 Binary Tree Longest Consecutive Sequence solution C++
299 Bulls and Cows solution C++
300 Longest Increasing Subsequence solution C++ Java
301 0301-Remove-Invalid-Parentheses solution
[缺:DP+构建]
C++
303 Range Sum Query - Immutable C++
304 Range Sum Query 2D - Immutable solution C++
305 Number of Islands II solution C++
306 Additive Number [无] C++
307 Range Sum Query - Mutable [缺:BIT] C++
308 Range Sum Query 2D - Mutable C++
309 Best Time to Buy and Sell Stock with Cooldown solution C++
310 Minimum Height Trees solution C++
311 Sparse Matrix Multiplication [无] C++
312 Burst Balloons solution 题解 C++
313 Super Ugly Number [无] C++
314 Binary Tree Vertical Order Traversal [无] C++
315 Count of Smaller Numbers After Self [无] C++
316 Remove Duplicate Letters solution C++
317 Shortest Distance from All Buildings solution C++
318 Maximum Product of Word Lengths solution C++
319 Bulb Switcher [无] C++
321 Create Maximum Number [无] C++
322 Coin Change solution C++
323 Number of Connected Components in an Undirected Graph solution C++
324 Wiggle Sort II [无] C++
325 Maximum Size Subarray Sum Equals k solution C++
326 Power of Three solution C++
328 Odd Even Linked List solution C++
329 Longest Increasing Path in a Matrix solution C++
330 Patching Array [无] C++
331 Verify Preorder Serialization of a Binary Tree solution C++
332 Reconstruct Itinerary solution C++
334 Increasing Triplet Subsequence solution C++
335 Self Crossing [无] C++
336 Palindrome Pairs solution C++
337 House Robber III [无] C++
338 Counting Bits solution C++
339 Nested List Weight Sum [无] C++
340 Longest Substring with At Most K Distinct Characters solution C++
341 Flatten Nested List Iterator [无] C++
342 Power of Four solution C++
343 Integer Break [无] C++ Java
344 Reverse String [无] C++
345 Reverse Vowels of a String [无] C++
346 Moving Average from Data Stream [无] C++
347 Top K Frequent Elements solution C++ Java
348 Find Winner on a Tic Tac Toe Game [无] C++
349 Intersection of Two Arrays solution C++ Java
350 Intersection of Two Arrays II [无] C++ Java
352 Data Stream as Disjoint Intervals [无] C++
354 Russian Doll Envelopes solution C++
357 Count Numbers with Unique Digits [无] C++
359 Logger Rate Limiter [无] C++
360 Sort Transformed Array [无] C++
362 Design Hit Counter [无] C++
363 Max Sum of Rectangle No Larger Than K [无] C++
364 Nested List Weight Sum II [无] C++
365 Water and Jug Problem 题解
[缺:数学解法]
C++
366 Find Leaves of Binary Tree solution C++
367 Valid Perfect Square solution C++
368 Largest Divisible Subset solution C++
369 Plus One Linked List solution C++
370 Range Addition C++
372 Super Pow [无] C++
373 Find K Pairs with Smallest Sums [无] C++
374 Guess Number Higher or Lower solution C++
375 Guess Number Higher or Lower II [无] C++
376 Wiggle Subsequence solution C++
[缺:DP;O(1) 空间贪心]
377 Combination Sum IV [无] C++
378 Kth Smallest Element in a Sorted Matrix [无] C++
380 Insert Delete GetRandom O(1) [无] C++
381 Insert Delete GetRandom O(1) - Duplicates allowed [无] C++
382 Linked List Random Node [无] C++
383 Ransom Note solution C++
384 Shuffle an Array solution C++
385 Mini Parser [无] C++
386 Lexicographical Numbers C++
387 First Unique Character in a String solution C++ Java
388 Longest Absolute File Path C++
389 Find the Difference C++
390 Elimination Game C++
391 Perfect Rectangle [缺:矩形求交] C++
392 Is Subsequence [无] C++
393 UTF-8 Validation solution C++
394 Decode String [无] C++
395 Longest Substring with At Least K Repeating Characters solution
[缺:滑动窗口]
C++
396 Rotate Function [无] C++
397 Integer Replacement [无] C++
398 Random Pick Index [无] C++
399 Evaluate Division solution
[缺:UF]
C++
400 Nth Digit [无] C++
401 Binary Watch [无] C++
402 Remove K Digits solution 题解 C++
403 Frog Jump solution
[缺:dp]
C++
404 Sum of Left Leaves [无] C++
405 Convert a Number to Hexadecimal [无] C++
406 Queue Reconstruction by Height [无] C++
407 Trapping Rain Water II [无] C++
410 Split Array Largest Sum solution 题解 C++
412 Fizz Buzz solution C++
413 Arithmetic Slices solution C++
414 Third Maximum Number [无] C++
415 Add Strings solution C++
416 Partition Equal Subset Sum [无] C++ Java
417 Pacific Atlantic Water Flow C++ Java
419 Battleships in a Board [无] C++
420 Strong Password Checker [无] C++
421 Maximum XOR of Two Numbers in an Array solution C++
422 Valid Word Square [无] C++
423 Reconstruct Original Digits from English solution C++
424 Longest Repeating Character Replacement [无] C++
426 Convert Binary Search Tree to Sorted Doubly Linked List solution C++
427 Construct Quad Tree [无] C++
429 N-ary Tree Level Order Traversal [无] C++
430 Flatten a Multilevel Doubly Linked List [无] C++
431 Encode N-ary Tree to Binary Tree solution C++
432 All O one Data Structure [无] [缺:O(1)] C++
433 Minimum Genetic Mutation [无] C++
434 Number of Segments in a String [无] C++
435 Non-overlapping Intervals solution C++ Java
436 Find Right Interval [无] C++
437 Path Sum III [无] C++ Java
438 Find All Anagrams in a String [无] C++
439 Ternary Expression Parser [无] C++
440 K-th Smallest in Lexicographical Order [无] [缺:更简单的实现] C++
441 Arranging Coins solution C++
442 Find All Duplicates in an Array solution C++
443 String Compression C++
444 Sequence Reconstruction [无] C++
445 Add Two Numbers II [无] C++
446 Arithmetic Slices II - Subsequence solution C++
447 Number of Boomerangs [无] C++ Java
448 Find All Numbers Disappeared in an Array solution C++
449 Serialize and Deserialize BST solution C++
450 Delete Node in a BST solution C++
451 Sort Characters By Frequency [无] C++ Java
452 Minimum Number of Arrows to Burst Balloons solution C++
453 Minimum Moves to Equal Array Elements solution C++
454 4Sum II [无] C++ Java
455 Assign Cookies [无] C++ Java
456 132 Pattern solution
[缺:O(n) 单调栈算法]
C++
457 Circular Array Loop [无] C++
458 Poor Pigs solution C++
459 Repeated Substring Pattern [无] C++
460 LFU Cache solution C++
461 Hamming Distance solution C++
462 Minimum Moves to Equal Array Elements II solution C++
463 Island Perimeter solution C++
464 Can I Win [无] C++
467 Unique Substrings in Wraparound String [无] C++
468 Validate IP Address [无] C++
470 Implement Rand10() Using Rand7() solution C++
472 Concatenated Words [无] C++
473 Matchsticks to Square solution C++
474 Ones and Zeroes solution C++
475 Heaters [无] C++
476 Number Complement solution C++
477 Total Hamming Distance solution 题解 C++
478 Generate Random Point in a Circle solution C++
479 Largest Palindrome Product [无] C++
480 Sliding Window Median [无]
[缺:双数据结构]
C++
481 Magical String [无] C++
482 License Key Formatting [无] C++
483 Smallest Good Base [无] C++
484 Find Permutation solution C++
485 Max Consecutive Ones [无] C++
486 Predict the Winner [无] C++
487 Max Consecutive Ones II [无] C++
488 Zuma Game [无] C++
489 Robot Room Cleaner solution C++
490 The Maze solution C++
491 Non-decreasing Subsequences [无] C++
492 Construct the Rectangle [无] C++
494 Target Sum solution C++
495 Teemo Attacking solution C++
496 Next Greater Element I solution C++
497 Random Point in Non-overlapping Rectangles solution C++
498 Diagonal Traverse [无] C++
500 Keyboard Row [无] C++
501 Find Mode in Binary Search Tree [无] C++
502 IPO solution C++
503 Next Greater Element II solution C++
504 Base 7 [无] C++
505 The Maze II solution C++
506 Relative Ranks [无] C++
507 Perfect Number solution C++
508 Most Frequent Subtree Sum [无] C++
509 Fibonacci Number [无] C++
510 Inorder Successor in BST II [无] C++
511 Database Problem: Link - - - -
513 Find Bottom Left Tree Value [无] C++
515 Find Largest Value in Each Tree Row [无] C++
516 Longest Palindromic Subsequence [无] C++
517 Super Washing Machines solution C++
518 Coin Change 2 [无] C++
519 Random Flip Matrix solution C++
520 Detect Capital solution C++
521 Longest Uncommon Subsequence I solution C++
522 Longest Uncommon Subsequence II solution C++
523 Continuous Subarray Sum [无] C++
524 Longest Word in Dictionary through Deleting solution C++
525 Contiguous Array solution 题解 C++
526 Beautiful Arrangement solution C++
527 Word Abbreviation solution C++
528 Random Pick with Weight solution C++
529 Minesweeper [无] C++
530 Minimum Absolute Difference in BST [无] Java
531 Lonely Pixel I [无] C++
532 K-diff Pairs in an Array solution C++
533 Lonely Pixel II [无] C++
536 Construct Binary Tree from String solution
[缺:stack]
C++
537 Complex Number Multiplication solution C++
538 Convert BST to Greater Tree solution C++
539 Minimum Time Difference [无] C++
540 Single Element in a Sorted Array solution C++
541 Reverse String II solution C++
542 01 Matrix solution C++
543 Diameter of Binary Tree solution C++
546 Remove Boxes solution C++
547 Number of Provinces solution C++
549 Binary Tree Longest Consecutive Sequence II solution C++
551 Student Attendance Record I solution C++
552 Student Attendance Record II solution C++
553 Optimal Division solution
[缺:O(n) 解法]
C++
554 Brick Wall solution C++
556 Next Greater Element III solution
[缺:底层实现]
C++
557 Reverse Words in a String III solution C++
558 Logical OR of Two Binary Grids Represented as Quad-Trees [无] C++
559 Maximum Depth of N-ary Tree solution C++
560 Subarray Sum Equals K solution C++
561 Array Partition I solution C++
563 Binary Tree Tilt solution C++
564 Find the Closest Palindrome [无] C++
565 Array Nesting solution C++
566 Reshape the Matrix solution C++
567 Permutation in String solution 题解 C++
570 Database Problem: Link - - - -
572 Subtree of Another Tree solution C++
573 Squirrel Simulation solution C++
575 Distribute Candies solution C++
576 Out of Boundary Paths solution C++
580 Database Problem: Link - - - -
581 Shortest Unsorted Continuous Subarray solution
[缺:Stack]
C++
582 Kill Process solution C++
583 Delete Operation for Two Strings solution C++
584 Database Problem: Link - - - -
586 Database Problem: Link - - - -
587 Erect the Fence solution 题解
[缺:凸包解法整理]
C++
589 N-ary Tree Preorder Traversal solution C++
590 N-ary Tree Postorder Transversal solution C++
591 Tag Validator solution C++
592 Fraction Addition and Subtraction [无] C++
593 Valid Square solution C++
594 Longest Harmonious Subsequence solution C++
595 Database Problem: Link - - - -
598 Range Addition II C++
599 Minimum Index Sum of Two Lists solution C++
600 Non-negative Integers without Consecutive Ones solution
[缺:Bit Manipulation]
C++
605 Can Place Flowers solution C++
606 Construct String from Binary Tree solution C++
607 Database Problem: Link - - - -
608 Database Problem: Link - - - -
609 Find Duplicate File in System solution C++
611 Valid Triangle Number solution C++
617 Merge Two Binary Trees C++
619 Database Problem: Link - - - -
621 Task Scheduler solution C++
622 Design Circular Queue [无] C++
623 Add One Row to Tree solution C++
627 Database Problem: Link - - - -
628 Maximum Product of Three Numbers solution C++
629 K-Inverse-Pairs-Array solution
[缺:其他 dp 优化思路]
C++
630 Course Schedule III solution C++
632 Smallest Range Covering Elements from K Lists solution C++
633 Sum of Square Numbers C++
636 Exclusive Time of Functions [无] C++
637 Average of Levels in Binary Tree solution C++
638 Shopping Offers solution C++
639 Decode Ways II solution
[缺:DP]
C++
640 Solve the Equation [无] C++
642 Design Search Autocomplete System [无] C++
643 Maximum Average Subarray I solution C++
644 Maximum Average Subarray II solution C++
645 Set Mismatch solution
[缺:空间 O(1) 解法]
C++
646 Maximum Length of Pair Chain solution C++
647 Palindromic Substrings solution C++
648 Replace Words [无] C++
649 Dota2 Senate solution
[缺:队列]
C++
650 2 Keys Keyboard solution C++
652 Find Duplicate Subtrees solution C++
653 Two Sum IV - Input is a BST [无] C++
654 Maximum Binary Tree solution C++
655 Print Binary Tree [无] C++
658 Find K Closest Elements solution
[缺:二分]
C++
659 Split Array into Consecutive Subsequences solution C++
661 Image Smoother [无] C++
662 Maximum Width of Binary Tree solution C++
664 Strange Printer solution C++
665 Non-decreasing Array solution C++
666 Path Sum IV solution C++
667 Beautiful Arrangement II solution C++
668 Kth Smallest Number in Multiplication Table solution C++
669 Trim a Binary Search Tree solution C++
670 Maximum Swap [无] C++
671 Second Minimum Node In a Binary Tree solution C++
672 Bulb Switcher II solution C++
673 Number of Longest Increasing Subsequence [缺:BIT;线段树] C++
674 Longest Continuous Increasing Subsequence C++
675 Cut Off Trees for Golf Event [缺:A*;Hadlock's Algo] C++
676 Implement Magic Dictionary solution C++
677 Map Sum Pairs solution C++
678 Valid Parenthesis String solution C++
679 24 Game solution C++
680 Valid Palindrome II [无] C++
682 Baseball Game solution C++
684 Redundant Connection solution C++
685 Redundant Connection II solution C++
686 Repeated String Match [无] C++
687 Longest Univalue Path solution C++
688 Knight Probability in Chessboard solution C++
689 Maximum Sum of 3 Non-Overlapping Subarrays solution C++
690 Employee Importance solution C++
691 Stickers to Spell Word [无] C++
692 Top K Frequent Words solution C++
693 Binary Number with Alternating Bits [无] C++
694 Number of Distinct Islands [review: hash的方式] C++
695 Max-Area-of-Island C++
696 Count Binary Substrings C++
697 Degree of an Array C++
698 Partition to K Equal Sum Subsets C++ Java
699 Falling Squares [缺:线段树;块状链表] C++
700 Search in a Binary Search Tree solution C++
701 Insert into a Binary Search Tree solution C++
703 Kth Largest Element in a Stream [无] C++
704 Binary Search solution C++
705 Design HashSet [无] C++
706 Design HashMap [无] C++
707 Design Linked List [无] C++
708 Insert into a Cyclic Sorted List [无] C++
709 To Lower Case solution C++
710 Random Pick with Blacklist solution C++
711 Number of Distinct Islands II [review: hash的方式] C++
712 Minimum ASCII Delete Sum for Two Strings C++
713 Subarray Product Less Than K C++
714 Best Time to Buy and Sell Stock with Transaction Fee C++
715 Range Module [缺:set查找] C++
716 Max Stack solution C++
717 1-bit and 2-bit Characters C++
718 Maximum Length of Repeated Subarray [缺:Rolling Hash] C++
719 Find K-th Smallest Pair Distance solution C++
720 Longest Word in Dictionary solution C++
721 Accounts Merge solution C++
722 Remove Comments solution C++
723 Candy Crush solution C++
724 Find Pivot Index solution C++
725 Split Linked List in Parts solution C++
726 Number of Atoms solution C++
727 Minimum Window Subsequence solution C++
728 Self Dividing Numbers solution C++
729 My Calendar I solution C++
730 Count Different Palindromic Subsequences [无] C++
731 My Calendar II solution C++
732 My Calendar III solution C++
733 Flood Fill solution C++
734 Sentence Similarity solution C++
735 Asteroid Collision solution C++
736 Parse Lisp Expression solution C++
737 Sentence Similarity II solution C++
739 Daily Temperatures solution C++
740 Delete and Earn solution C++
741 Cherry Pickup solution
[缺:自底向上的动态规划]
C++
745 Prefix and Suffix Search solution C++
746 Min Cost Climbing Stairs solution C++
747 Largest Number At Least Twice of Others solution C++
749 Contain Virus [无] C++
752 Open the Lock solution C++
753 Cracking the Safe [无] C++
754 Reach a Number Solution C++
757 Set Intersection Size At Least Two [无] C++
761 Special Binary String solution C++
762 Prime Number of Set Bits in Binary Representation [无] C++
763 Partition Labels [无] C++
764 Largest Plus Sign C++
765 Couples Holding Hands solution C++
766 Toeplitz Matrix solution C++
771 Jewels and Stones solution C++
772 Basic Calculator III [无] C++
774 Minimize Max Distance to Gas Station solution C++
775 Global and Local Inversions C++
779 K-th Symbol in Grammar [无] C++
780 Reaching Points solution C++
781 Rabbits in Forest solution C++
782 Transform to Chessboard solution C++
783 Minimum Distance Between BST Nodes solution C++
784 Letter Case Permutation solution C++
785 Is Graph Bipartite? solution C++
786 K-th Smallest Prime Fraction solution
[缺:分治算法]
C++
787 Cheapest Flights Within K Stops solution
[缺:使用Heap]
C++
788 Rotated Digits solution C++
789 Escape The Ghosts solution C++
790 Domino and Tromino Tiling solution
[缺:转移矩阵求幂解法]
C++
791 Custom Sort String solution C++
792 Number of Matching Subsequences solution C++
793 Preimage Size of Factorial Zeroes Function solution C++
794 Valid Tic-Tac-Toe State solution C++
795 Number of Subarrays with Bounded Maximum solution C++
796 Rotate String solution
[缺:Rolling Hash]
C++
797 All Paths From Source to Target solution C++
798 Smallest Rotation with Highest Score solution
[缺:O(n) 解法]
C++
799 Champagne Tower solution C++
800 Similar RGB Color solution C++
802 Find Eventual Safe States solution C++
803 Bricks Falling When Hit [无] C++
804 Unique Morse Code Words solution C++
805 Split Array With Same Average solution C++
806 Number of Lines To Write String solution C++
807 Max Increase to Keep City Skyline solution C++
809 Expressive Words solution C++
810 Chalkboard XOR Game solution C++
811 Subdomain Visit Count solution C++
813 Largest Sum of Averages solution C++
814 Binary Tree Pruning solution C++
815 Bus Routes solution C++
817 Linked List Components solution C++
819 Most Common Word solution C++
822 Card Flipping Game [无] C++
823 Binary Trees With Factors solution C++
824 Goat Latin [无] C++
825 Friends Of Appropriate Ages [无] C++
827 Making A Large Island [无] C++
828 Count Unique Characters of All Substrings of a Given String [无] C++
829 Consecutive Numbers Sum [无] C++
830 Positions of Large Groups solution C++
831 Masking Personal Information [无] C++
832 Flipping an Image solution C++
833 Find And Replace in String [无] C++
834 Sum of Distances in Tree solution C++
835 Image Overlap [无] C++
837 New 21 Game [无] C++
838 Push Dominoes solution C++
839 Similar String Groups solution
C++
841 Keys and Rooms solution C++
842 Split Array into Fibonacci Sequence solution C++
844 Backspace String Compare solution C++
846 Hand of Straights [无] C++
847 Shortest Path Visiting All Nodes [无] C++
848 Shifting Letters [无] C++
849 Maximize Distance to Closest Person [无] C++
850 Rectangle Area II solution C++
851 Loud and Rich solution C++
852 Peak Index in a Mountain Array solution C++
853 Car Fleet solution C++
854 K-Similar Strings solution C++
855 Exam Room solution C++
856 Score of Parentheses solution C++
857 Minimum Cost to Hire K Workers solution
[缺:二分搜索]
C++
858 Mirror Reflection solution C++
859 Buddy Strings solution C++
860 Lemonade Change solution C++
861 Score After Flipping Matrix solution C++
863 All Nodes Distance K in Binary Tree solution C++
864 Shortest Path to Get All Keys solution
[缺:Dijkstra]
C++
865 Smallest Subtree with all the Deepest Nodes solution C++
866 Prime Palindrome solution C++
867 Transpose Matrix solution C++
868 Binary Gap solution C++
869 Reordered Power of 2 solution C++
870 Advantage Shuffle solution C++
871 Minimum Number of Refueling Stops solution 题解 C++
872 Leaf-Similar Trees solution C++
873 Length of Longest Fibonacci Subsequence solution C++
874 Walking-Robot-Simulation solution C++
875 Koko Eating Bananas solution C++
876 Middle of the Linked List solution C++
877 Stone Game solution C++
878 Nth Magical Number solution C++
879 Profitable Schemes solution C++
880 Decoded String at Index solution C++
881 Boats to Save People solution C++
882 Reachable Nodes In Subdivided Graph solution C++
883 Projection Area of 3D Shapes solution C++
884 Uncommon Words from Two Sentences solution C++
885 Spiral Matrix III solution C++
886 Possible Bipartition solution C++
888 Fair Candy Swap solution C++
889 Construct Binary Tree from Preorder and Postorder Traversal solution C++
890 Find and Replace Pattern solution C++
891 Sum of Subsequence Widths solution C++
892 Surface Area of 3D Shapes solution C++
893 Groups of Special-Equivalent Strings solution C++
894 All Possible Full Binary Trees solution C++
895 Maximum Frequency Stack solution C++
896 Monotonic Array solution C++ Python
897 Increasing Order Search Tree solution C++
898 Bitwise ORs of Subarrays solution C++
899 Orderly Queue solution C++
900 RLE Iterator solution C++
901 Online Stock Span solution C++
902 Numbers At Most N Given Digit Set solution C++
903 Valid Permutations for DI Sequence solution
[缺:O(n^2) DP]
C++
904 Fruit Into Baskets solution C++
905 Sort Array By Parity solution C++
906 Super Palindromes solution C++
907 Sum of Subarray Minimums solution C++
908 Smallest Range I solution C++
909 Snakes and Ladders solution C++
910 Smallest Range II solution C++
911 Online Election solution C++
912 Sort an Array [无] C++
913 Cat and Mouse Game solution
[缺:DFS拓扑排序;DP]
C++
914 X of a Kind in a Deck of Cards solution C++
915 Partition Array into Disjoint Intervals solution C++
916 Word Subsets solution C++
917 Reverse Only Letters solution C++
918 Maximum Sum Circular Subarray solution C++
919 Complete Binary Tree Inserter solution C++
920 Number of Music Playlists solution
[缺:生成函数]
C++
921 Minimum Add to Make Parentheses Valid solution C++
922 Sort Array By Parity II solution C++
923 3Sum With Multiplicity solution C++
924 Minimize Malware Spread solution C++
925 Long Pressed Name solution C++
926 Flip String to Monotone Increasing solution C++
927 Three Equal Parts solution C++
928 Minimize Malware Spread II solution C++
929 Unique Email Addresses solution C++
930 Binary Subarrays With Sum solution C++
931 Minimum Path Falling Sum solution C++
932 Beautiful Array solution C++
933 Number of Recent Calls solution C++
934 Shortest Bridge solution C++
935 Knight Dialer solution C++
936 Stamping The Sequence solution C++
937 Reorder Log Files solution C++
938 Range Sum of BST solution C++
939 Minimum Area Rectangle solution C++
940 Distinct Subsequences II solution C++
941 Valid Mountain Array solution C++
942 DI String Match solution C++
943 Find the Shortest Superstring solution
[缺:动态规划]
C++
944 Delete Columns to Make Sorted solution C++
945 Minimum Increment to Make Array Unique solution C++
946 Validate Stack Sequences solution C++
947 Most Stones Removed with Same Row or Column solution C++
948 Bag of Tokens solution C++
949 Largest Time for Given Digits solution C++
950 Reveal Cards In Increasing Order solution C++
951 Flip Equivalent Binary Trees solution C++
952 Largest Component Size by Common Factor solution C++
953 isAlienSorted solution C++
954 Array of Doubled Pairs solution C++
955 Delete Columns to Make Sorted II solution C++
956 Tallest Billboard solution C++
957 Prison Cells After N Days solution C++
958 Check Completeness of a Binary Tree solution C++
959 Regions Cut By Slashes solution C++
960 Delete Columns to Make Sorted III solution C++
961 N-Repeated Element in Size 2N Array solution C++
965 Univalued Binary Tree solution C++
966 Vowel Spellchecker solution C++
967 Numbers With Same Consecutive Differences solution C++
968 Binary Tree Cameras solution C++
969 Pancake Sorting solution C++
970 Powerful Integers solution C++
971 Flip Binary Tree To Match Preorder Traversal solution C++
972 Equal Rational Numbers solution C++
973 K Closest Points to Origin solution C++
974 Subarray Sums Divisible by K solution C++
975 Odd Even Jump solution C++
976 Largest Perimeter Triangle solution C++
977 Squares of a Sorted Array solution C++
978 Longest Turbulent Subarray solution
[缺:滑动窗口 & dp]
C++
979 Distribute Coins in Binary Tree solution C++
980 Unique Paths III solution
[缺:记忆化搜索]
C++ Java
981 Time Based Key-Value Store solution C++
982 Triples with Bitwise AND Equal To Zero [无] C++
983 Minimum Cost For Tickets solution C++
984 String Without AAA or BBB solution C++
985 Sum of Even Numbers After Queries solution C++
986 Interval List Intersections solution C++
987 Vertical Order Traversal of a Binary Tree solution C++
988 Smallest String Starting From Leaf solution C++
989 Add to Array-Form of Integer solution C++
990 Satisfiability of Equality Equations solution C++
991 Broken Calculator solution C++
992 Subarrays with K Different Integers solution C++
993 Cousins in Binary Tree solution C++
994 Rotting Oranges solution C++
995 Minimum Number of K Consecutive Bit Flips solution C++
996 Number of Squareful Arrays solution C++
997 Find the Town Judge [无] C++
998 Maximum Binary Tree II [无] C++
999 Available Captures for Rook [无] C++
1000 Minimum Cost to Merge Stones [无] C++
1001 Grid Illumination [无] C++
1002 Find Common Characters [无] C++
1003 Check If Word Is Valid After Substitutions [无] C++
1004 Max Consecutive Ones III [无] C++
1005 Maximize Sum Of Array After K Negations [无] C++
1006 Clumsy Factorial [无] C++
1007 Minimum Domino Rotations For Equal Row [无] C++
1008 Construct Binary Search Tree from Preorder Traversal [无] C++
1009 Complement of Base 10 Integer [无] C++
1010 Pairs of Songs With Total Durations Divisible by 60 [无] C++
1011 Capacity To Ship Packages Within D Days [无] C++
1012 Numbers With 1 Repeated Digit [无] C++
1013 Partition Array Into Three Parts With Equal Sum [无] C++
1014 Best Sightseeing Pair [无] C++
1015 Smallest Integer Divisible by K [无] C++
1016 Binary String With Substrings Representing 1 To N [无] C++
1017 Convert to Base -2 [无] C++
1018 Binary Prefix Divisible By 5 [无] C++
1019 Next Greater Node In Linked List [无] C++
1020 Number of Enclaves [无] C++
1021 Remove Outermost Parentheses [无] C++
1022 Sum of Root To Leaf Binary Numbers [无] C++
1023 Camelcase Matching [无] C++
1024 Video Stitching [无] C++
1025 Divisor Game [无] C++
1026 Maximum Difference Between Node and Ancestor [无] C++
1027 Longest Arithmetic Sequence [无] C++
1028 Recover a Tree From Preorder Traversal [无] C++
1029 Two City Scheduling [无] C++
1030 Matrix Cells in Distance Order [无] C++
1031 Maximum Sum of Two Non-Overlapping Subarrays [无] C++
1032 Stream of Characters [无] C++
1033 Moving Stones Until Consecutive [无] C++
1034 Coloring A Border [无] C++
1035 Uncrossed Lines [无] C++
1036 Escape a Large Maze [无] C++
1037 Valid Boomerang [无] C++
1038 Binary Search Tree to Greater Sum Tree [无] C++
1039 Minimum Score Triangulation of Polygon [无] C++
1040 Moving Stones Until Consecutive II [无] C++
1041 Robot Bounded In Circle [无] C++
1042 Flower Planting With No Adjacent [无] C++
1043 Partition Array for Maximum Sum [无] C++
1044 Longest Duplicate Substring [无]
[缺:后缀数组]
C++
1046 Last Stone Weight [无] C++
1047 Remove All Adjacent Duplicates In String [无] C++
1049 Last Stone Weight II [无] C++
1050 Database Problem: Link - - - -
1051 Height Checker [无] C++
1052 Grumpy Bookstore Owner [无] C++
1053 Previous Permutation With One Swap [无] C++
1054 Distant Barcodes [无] C++
1055 Shortest Way to Form String [无] C++
1056 Confusing Number [无] C++
1059 All Paths from Source Lead to Destination solution C++
1061 Lexicographically Smallest Equivalent String [无] C++
1062 Longest Repeating Substring [无] C++
1065 Index Pairs of a String [无] C++
1066 Campus Bikes II solution C++
1072 Flip Columns For Maximum Number of Equal Rows [无] C++
1074 Number of Submatrices That Sum to Target [无] C++
1078 Occurrences After Bigram [无] C++
1079 Letter Tile Possibilities [无] C++
1080 Insufficient Nodes in Root to Leaf Paths [无] C++
1081 Smallest Subsequence of Distinct Characters [无] C++
1084 Database Problem: Link - - - -
1087 Brace Expansion [无] C++
1088 Confusing Number II [无] C++
1089 Duplicate Zeros [无] C++
1090 Largest Values From Labels [无] C++
1091 Shortest Path in Binary Matrix [无] C++
1092 Shortest Common Supersequence [无] C++
1093 Statistics from a Large Sample [无] C++
1094 Car Pooling [无] C++
1095 Find in Mountain Array [无] C++
1096 Brace Expansion II [无]
[缺:非递归算法]
C++
1099 Two Sum Less Than K [无] C++
1100 Find K-Length Substrings With No Repeated Characters [无] C++
1101 The Earliest Moment When Everyone Become Friends [无] C++
1102 Path With Maximum Minimum Value [无]
[缺:并查集]
C++
1103 Distribute Candies to People solution C++
1104 Path In Zigzag Labelled Binary Tree [无] C++
1105 Filling Bookcase Shelves [无] C++
1106 Parsing A Boolean Expression [无]
[缺:非递归算法]
C++
1108 Defanging an IP Address [无] C++
1109 Corporate Flight Bookings [无] C++
1110 Delete Nodes And Return Forest [无] C++
1111 Maximum Nesting Depth of Two Valid Parentheses Strings [无] C++
1112 Database Problem: Link - - - -
1118 Number of Days in a Month [无] C++
1119 Remove Vowels from a String [无] C++
1120 Maximum Average Subtree [无] C++
1121 Divide Array Into Increasing Sequences [无] C++
1124 Longest Well-Performing Interval [无] C++
1128 Number of Equivalent Domino Pairs [无] C++
1129 Shortest Path with Alternating Colors [无] C++
1130 Minimum Cost Tree From Leaf Values [无] C++
1131 Maximum of Absolute Value Expression [无] C++
1133 Largest Unique Number [无] C++
1134 Armstrong Number [无] C++
1135 Connecting Cities With Minimum Cost [无] C++
1136 Parallel Courses [无]
[缺:后序遍历拓扑排序]
C++
1137 N-th Tribonacci Number [无] C++
1138 Alphabet Board Path [无] C++
1139 Largest 1-Bordered Square [无] C++
1140 Stone Game II [无] C++
1141 Database Problem: Link - - - -
1143 Longest Common Subsequence [无] C++
1144 Decrease Elements To Make Array Zigzag [无] C++
1145 Binary Tree Coloring Game [无] C++
1146 Snapshot Array [无] C++
1147 Longest Chunked Palindrome Decomposition [无] C++
1148 Database Problem: Link - - - -
1150 Check If a Number Is Majority Element in a Sorted Array [无] C++
1151 Minimum Swaps to Group All 1's Together [无] C++
1152 Analyze User Website Visit Pattern [无] C++
1153 String Transforms Into Another String [无] C++
1154 Day of the Year [无] C++
1155 Number of Dice Rolls With Target Sum [无]
[缺:空间优化]
C++
1156 Swap For Longest Repeated Character Substring [无] C++
1157 Online Majority Element In Subarray [无] C++
1158 Database Problem: Link - - - -
1160 Find Words That Can Be Formed by Characters [无] C++
1161 Maximum Level Sum of a Binary Tree [无] C++
1162 As Far from Land as Possible [无] C++
1163 Last Substring in Lexicographical Order [无] C++
1165 Single-Row Keyboard [无] C++
1166 Design File System [无] C++
1167 Minimum Cost to Connect Sticks [无] C++
1168 Optimize Water Distribution in a Village [无] C++
1169 Invalid Transactions [无] C++
1170 Compare Strings by Frequency of the Smallest Character [无] C++
1171 Remove Zero Sum Consecutive Nodes from Linked List [无] C++
1172 Dinner Plate Stacks [无] C++
1173 Database Problem: Link - - - -
1175 Prime Arrangements [无] C++
1176 Diet Plan Performance [无] C++
1177 Can Make Palindrome from Substring [无] C++
1178 Number of Valid Words for Each Puzzle [无] C++
1180 Count Substrings with Only One Distinct Letter [无] C++
1181 Before and After Puzzle [无] C++
1182 Shortest Distance to Target Color [无] C++
1183 Maximum Number of Ones [无] C++
1184 Distance Between Bus Stops [无] C++
1185 Day of the Week [无] C++
1186 Maximum Subarray Sum with One Deletion [无] C++
1187 Make Array Strictly Increasing [无]
[缺:动态规划]
C++
1189 Maximum Number of Balloons [无] C++
1190 Reverse Substrings Between Each Pair of Parentheses [无] C++
1191 K-Concatenation Maximum Sum [无] C++
1192 Critical Connections in a Network [无] C++
1196 How Many Apples Can You Put into the Basket [无] C++
1197 Minimum Knight Moves [无] C++
1198 Find Smallest Common Element in All Rows [无] C++
1199 Minimum Time to Build Blocks [无] C++
1200 Minimum Absolute Difference [无] C++
1201 Ugly Number III [无] C++
1202 Smallest String With Swaps [无] C++
1203 Sort Items by Groups Respecting Dependencies [无] C++
1207 Unique Number of Occurrences [无] C++
1208 Get Equal Substrings Within Budget [无] C++
1209 Remove All Adjacent Duplicates in String II [无] C++
1210 Minimum Moves to Reach Target with Rotations [无] C++
1211 Database Problem: Link - - - -
1213 Intersection of Three Sorted Arrays [无] C++
1214 Two Sum BSTs [无] C++
1215 Stepping Numbers [无] C++
1216 Valid Palindrome III [无] C++
1217 Play with Chips [无] C++
1218 Longest Arithmetic Subsequence of Given Difference [无] C++
1219 Path with Maximum Gold [无] C++
1220 Count Vowels Permutation [无] C++
1221 Split a String in Balanced Strings [无] C++
1222 Queens That Can Attack the King [无] C++
1223 Dice Roll Simulation [无] C++
1224 Maximum Equal Frequency [无] C++
1228 Missing Number In Arithmetic Progression [无] C++
1229 Meeting Scheduler [无] C++
1230 Toss Strange Coins [无] C++
1231 Divide Chocolate [无] C++
1232 Check If It Is a Straight Line [无] C++
1233 Remove Sub-Folders from the Filesystem [无] C++
1234 Replace the Substring for Balanced String [无] C++
1235 Maximum Profit in Job Scheduling [无] C++
1236 Web Crawler [无] C++
1237 Find Positive Integer Solution for a Given Equation [无] C++
1238 Circular Permutation in Binary Representation [无] C++
1239 Maximum Length of a Concatenated String with Unique Characters [无] C++
1240 Tiling a Rectangle with the Fewest Squares [无] C++
1243 Array Transformation [无] C++
1244 Design A Leaderboard [无] C++
1245 Tree Diameter [无] C++
1247 Minimum Swaps to Make Strings Equal [无] C++
1248 Count Number of Nice Subarrays [无] C++ Java
1249 Minimum Remove to Make Valid Parentheses solution C++
1250 Check If It Is a Good Array [无] C++
1251 Database Problem: Link - - - -
1252 Cells with Odd Values in a Matrix [无] C++
1253 Reconstruct a 2-Row Binary Matrix [无] C++
1254 Number of Closed Islands [无] C++
1255 Maximum Score Words Formed by Letters [无] C++
1259 Handshakes That Don't Cross [无] C++
1260 Shift 2D Grid solution C++
1261 Find Elements in a Contaminated Binary Tree C++
1262 Greatest Sum Divisible by Three [无] C++
1263 Minimum Moves to Move a Box to Their Target Location [无] C++
1264 Database Problem: Link - - - -
1272 Remove Interval [无] C++
1275 Find Winner on a Tic Tac Toe Game [无] C++
1277 Count Square Submatrices with All Ones 题解 C++
1278 Palindrome Partitioning III [无] C++
1280 Database Problem: Link - - - -
1281 Subtract the Product and Sum of Digits of an Integer [无] C++
1282 Group the People Given the Group Size They Belong To [无] C++
1286 Iterator for Combination solution C++
1288 Remove Covered Intervals solution C++
1289 Minimum Falling Path Sum II [无] C++
1290 Convert Binary Number in a Linked List to Integer solution C++
1291 Sequential Digits solution C++
1293 Shortest Path in a Grid with Obstacles Elimination solution C++
1302 Deepest Leaves Sum solution C++
1303 Database Problem: Link - - - -
1304 Find N Unique Integers Sum up to Zero [无] C++
1305 All Elements in Two Binary Search Trees [无] C++
1306 Jump Game III [无] C++
1307 Verbal Arithmetic Puzzle [无] C++
1309 Decrypt String from Alphabet to Integer Mapping [无] C++
1310 XOR Queries of a Subarray [无] C++
1311 Get Watched Videos by Your Friends [无] C++
1312 Minimum Insertion Steps to Make a String Palindrome [无] C++
1317 Convert Integer to the Sum of Two No-Zero Integers [无] C++
1318 Minimum Flips to Make a OR b Equal to c [无] C++
1319 Number of Operations to Make Network Connected [无] C++
1323 Maximum 69 Number [无] C++
1326 Minimum Number of Taps to Open to Water a Garden [无] C++
1328 Break a Palindrome solution C++
1329 Sort the Matrix Diagonally solution C++
1330 Reverse Subarray To Maximize Array Value [无] C++
1331 Rank Transform of an Array [无] C++
1332 Remove Palindromic Subsequences solution C++
1333 Filter Restaurants by Vegan-Friendly, Price and Distance [无] C++
1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance [无] C++
1335 Minimum Difficulty of a Job Schedule [无] C++
1337 The K Weakest Rows in a Matrix solution C++
1338 Reduce Array Size to The Half solution C++
1339 Maximum Product of Splitted Binary Tree solution C++
1340 Jump Game V [无] C++
1341 Database Problem: Link - - - -
1342 Number of Steps to Reduce a Number to Zero [无] C++
1343 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold [无] C++
1344 Angle Between Hands of a Clock C++
1345 Jump Game IV [无] C++
1346 Check If N and Its Double Exist [无] C++
1347 Minimum Number of Steps to Make Two Strings Anagram [无] C++
1348 Tweet Counts Per Frequency [无] C++
1349 Maximum Students Taking Exam [无] C++
1350 Database Problem: Link - - - -
1351 Count Negative Numbers in a Sorted Matrix [无] C++
1352 Product of the Last K Numbers [无] C++
1353 Maximum Number of Events That Can Be Attended [无] C++
1354 Construct Target Array With Multiple Sums solution C++
1355 Database Problem: Link - - - -
1356 Sort Integers by The Number of 1 Bits [无] C++
1357 Apply Discount Every n Orders [无] C++
1358 Number of Substrings Containing All Three Characters [无] C++
1359 Count All Valid Pickup and Delivery Options [无] C++
1360 Number of Days Between Two Dates [无] C++
1361 Validate Binary Tree Nodes [无] C++
1362 Closest Divisors [无] C++
1363 Largest Multiple of Three [无] C++
1364 Database Problem: Link - - - -
1365 How Many Numbers Are Smaller Than the Current Number [无] C++
1366 Rank Teams by Votes [无] C++
1367 Linked List in Binary Tree [无] C++
1368 Minimum Cost to Make at Least One Valid Path in a Grid [无] C++
1369 Database Problem: Link - - - -
1370 Increasing Decreasing String [无] C++
1371 Find the Longest Substring Containing Vowels in Even Counts [无] C++
1372 Longest ZigZag Path in a Binary Tree 题解
[缺:dp,返回值DFS]
C++
1373 Maximum Sum BST in Binary Tree [无] C++
1374 Generate a String With Characters That Have Odd Counts [无] C++
1375 Bulb Switcher III [无] C++
1376 Time Needed to Inform All Employees [无] C++
1377 Frog Position After T Seconds [无] C++
1378 Database Problem: Link - - - -
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree [无] C++
1383 Maximum Performance of a Team [无] C++
1384 Database Problem: Link - - - -
1389 Create Target Array in the Given Order [无] C++
1390 Four Divisors [无] C++
1391 Check if There is a Valid Path in a Grid [无] C++
1392 Longest Happy Prefix [无] C++
1393 Database Problem: Link - - - -
1394 Find Lucky Integer in an Array [无] C++
1395 Count Number of Teams [无]
[缺:线段树]
C++
1396 Design Underground System solution C++
1397 Find All Good Strings [无]
[缺:双端数位 DP]
C++
1398 Database Problem: Link - - - -
1399 Count Largest Group [无] C++
1400 Construct K Palindrome Strings [无] C++
1401 Circle and Rectangle Overlapping [无] C++
1402 Reducing Dishes [无] C++
1403 Minimum Subsequence in Non Increasing Order [无] C++
1404 Number of Steps to Reduce a Number in Binary Representation to One [无] C++
1405 Longest Happy String [无] C++
1406 Stone Game III [无] C++
1407 Database Problem: Link - - - -
1408 String Matching in an Array [无] C++
1409 Queries on a Permutation With Key [无]
[缺:BIT]
C++
1410 HTML Entity Parser [无] C++
1411 Number of Ways to Paint N × 3 Grid [无] C++
1412 Database Problem: Link - - - -
1413 Minimum Value to Get Positive Step by Step Sum [无] C++
1414 Find the Minimum Number of Fibonacci Numbers Whose Sum Is K [无] C++
1415 The k-th Lexicographical String of All Happy Strings of Length n [无] C++
1416 Restore The Array [无] C++
1417 Reformat The String [无] C++
1418 Display Table of Food Orders in a Restaurant [无] C++
1419 Minimum Number of Frogs Croaking [无] C++
1420 Build Array Where You Can Find The Maximum Exactly K Comparisons [无] C++
1421 Database Problem: Link - - - -
1422 Maximum Score After Splitting a String [无] C++
1423 Maximum Points You Can Obtain from Cards [无] C++
1424 Diagonal Traverse II [无] C++
1425 Constrained Subset Sum [无] C++
1426 Counting Elements solution C++
1427 Perform String Shifts solution C++
1428 Leftmost Column with at Least a One solution C++
1429 First Unique Number solution C++
1430 Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree [无] C++
1431 Kids With the Greatest Number of Candies [无] C++
1432 Max Difference You Can Get From Changing an Integer [无] C++
1433 Check If a String Can Break Another String [无] C++
1434 Number of Ways to Wear Different Hats to Each Other [无] C++
1435 Database Problem: Link - - - -
1436 Destination City [无] C++
1437 Check If All 1's Are at Least Length K Places Away [无] C++
1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit [无] C++
1439 Find the Kth Smallest Sum of a Matrix With Sorted Rows [无] C++
1440 Database Problem: Link - - - -
1441 Build an Array With Stack Operations [无] C++
1442 Count Triplets That Can Form Two Arrays of Equal XOR [无]
[缺:O(n)]
C++
1443 Minimum Time to Collect All Apples in a Tree [无] C++
1444 Number of Ways of Cutting a Pizza [无] C++
1445 Database Problem: Link - - - -
1446 Consecutive Characters [无] C++
1447 Simplified Fractions [无] C++
1448 Count Good Nodes in Binary Tree [无] C++
1449 Form Largest Integer With Digits That Add up to Target [无] C++
1450 Number of Students Doing Homework at a Given Time [无] C++
1451 Rearrange Words in a Sentence [无] C++
1452 People Whose List of Favorite Companies Is Not a Subset of Another List [无] C++
1453 Maximum Number of Darts Inside of a Circular Dartboard [无]
[缺:Angular Sweep]
C++
1454 Database Problem: Link - - - -
1455 Check If a Word Occurs As a Prefix of Any Word in a Sentence [无] C++
1456 Maximum Number of Vowels in a Substring of Given Length [无] C++
1457 Pseudo Palindromic Paths in a Binary Tree [无] C++
1458 Max Dot Product of Two Subsequences [无] C++
1459 Database Problem: Link - - - -
1460 Make Two Arrays Equal by Reversing Sub-arrays [无] C++
1461 Check If a String Contains All Binary Codes of Size K [无] C++
1462 Course Schedule IV [无] C++
1463 Cherry Pickup II [无] C++
1464 Maximum Product of Two Elements in an Array [无] C++
1465 Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts [无] C++
1466 Reorder Routes to Make All Paths Lead to the City Zero [无] C++
1467 Probability of a Two Boxes Having The Same Number of Distinct Balls [无] C++
1468 Database Problem: Link - - - -
1469 Find All the Lonely Nodes [无] C++
1470 Shuffle the Array [无] C++
1471 The k Strongest Values in an Array [无] C++
1472 Design Browser History [无] C++
1473 Paint House III [无] C++
1474 Delete N Nodes After M Nodes of a Linked List [无] C++
1475 Final Prices With a Special Discount in a Shop [无] C++
1476 Subrectangle Queries [无] C++
1477 Find Two Non-overlapping Sub-arrays Each With Target Sum [无] C++
1478 Allocate Mailboxes [无] C++
1479 Database Problem: Link - - - -
1480 Running Sum of 1d Array [无] C++
1481 Least Number of Unique Integers after K Removals [无] C++
1482 Minimum Number of Days to Make m Bouquets [无] C++
1483 Kth Ancestor of a Tree Node [无] C++
1484 Database Problem: Link - - - -
1485 Clone Binary Tree With Random Pointer [无] C++
1486 XOR Operation in an Array [无] C++
1487 Making File Names Unique [无] C++
1488 Avoid Flood in The City [无] C++
1489 Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree [无]
[缺:O(ElogE) 的解]
C++
1490 Clone N-ary Tree [无] C++
1491 Average Salary Excluding the Minimum and Maximum Salary [无] C++
1492 The kth Factor of n [无] C++
1493 Longest Subarray of 1's After Deleting One Element [无] C++
1494 Parallel Courses II [无] C++
1495 Database Problem: Link - - - -
1496 Path Crossing [无] C++
1497 Check If Array Pairs Are Divisible by k [无] C++
1498 Number of Subsequences That Satisfy the Given Sum Condition [无] C++
1499 Max Value of Equation [无] C++
1506 Find Root of N-Ary Tree solution C++
1519 Number of Nodes in the Sub-Tree With the Same Label solution C++
1522 Diameter of N-Ary Tree [无] C++
1523 Count Odd Numbers in an Interval Range [无] C++
1527 Database Problem: Link - - - -
1531 String Compression II [无][缺:其他解法] C++
1533 Find the Index of the Large Integer solution C++
1539 Kth Missing Positive Number solution C++
1557 Minimum Number of Vertices to Reach All Nodes [无] C++
1559 Detect Cycles in 2D Grid [无] C++
1564 Put Boxes Into the Warehouse I [无] C++
1570 Dot Product of Two Sparse Vectors solution C++
1571 Database Problem: Link - - - -
1572 Matrix Diagonal Sum [无] C++
1574 Shortest Subarray to be Removed to Make Array Sorted [无] C++
1575 Count All Possible Routes [无] C++
1576 Replace All ?'s to Avoid Consecutive Repeating Characters [无] C++
1577 Number of Ways Where Square of Number Is Equal to Product of Two Numbers [无] C++
1578 Minimum Deletion Cost to Avoid Repeating Letters [无] C++
1579 Remove Max Number of Edges to Keep Graph Fully Traversable [无] C++
1580 Put Boxes Into the Warehouse II [无] C++
1581 Database Problem: Link - - - -
1582 Special Positions in a Binary Matrix [无] C++
1583 Count Unhappy Friends [无] C++
1584 Min Cost to Connect All Points [无]
[缺:prim 和 ]
C++
1585 Check If String Is Transformable With Substring Sort Operations [无] C++
1586 Binary Search Tree Iterator II [无]
[缺:用栈模拟]
C++
1587 Database Problem: Link - - - -
1588 Sum of All Odd Length Subarrays [无] C++
1589 Maximum Sum Obtained of Any Permutation [无] C++
1590 Make Sum Divisible by P [无] C++
1591 Strange Printer II [无] C++
1592 Rearrange Spaces Between Words [无] C++
1593 Split a String Into the Max Number of Unique Substrings [无] C++
1594 Maximum Non Negative Product in a Matrix [无] C++
1595 Minimum Cost to Connect Two Groups of Points [无] C++
1596 Database Problem: Link - - - -
1597 Build Binary Expression Tree From Infix Expression [无] C++
1598 Crawler Log Folder [无] C++
1599 Maximum Profit of Operating a Centennial Wheel [无] C++
1600 Throne Inheritance [无] C++
1601 Maximum Number of Achievable Transfer Requests [无]
[缺:网络流解法]
C++
1602 Find Nearest Right Node in Binary Tree solution C++
1603 Design Parking System [无] C++
1604 Alert Using Same Key-Card Three or More Times in a One Hour Period [无] C++
1605 Find Valid Matrix Given Row and Column Sums [无] C++
1606 Find Servers That Handled Most Number of Requests [无] C++
1607 Database Problem: Link - - - -
1608 Special Array With X Elements Greater Than or Equal X [无] C++
1609 Even Odd Tree [无] C++
1610 Maximum Number of Visible Points [无] C++
1611 Minimum One Bit Operations to Make Integers Zero [无] C++
1612 Check If Two Expression Trees are Equivalent [无] C++
1613 Database Problem: Link - - - -
1614 Maximum Nesting Depth of the Parentheses [无] C++
1615 Maximal Network Rank [无] C++
1616 Split Two Strings to Make Palindrome [无] C++
1617 Count Subtrees With Max Distance Between Cities [无] C++
1618 Maximum Font to Fit a Sentence in a Screen [无] C++
1619 Mean of Array After Removing Some Elements [无] C++
1620 Coordinate With Maximum Network Quality [无] C++
1621 Number of Sets of K Non-Overlapping Line Segments [无] C++
1622 Fancy Sequence [无] C++
1623 Database Problem: Link - - - -
1624 Largest Substring Between Two Equal Characters [无] C++
1625 Lexicographically Smallest String After Applying Operations [无] C++
1626 Best Team With No Conflicts [无]
[缺:nlogn 算法]
C++
1627 Graph Connectivity With Threshold [无] C++
1628 Design an Expression Tree With Evaluate Function [无] C++
1629 Slowest Key [无] C++
1630 Arithmetic Subarrays [无] C++
1631 Path With Minimum Effort solution C++
1632 Rank Transform of a Matrix solution C++
1633 Database Problem: Link - - - -
1634 Add Two Polynomials Represented as Linked Lists [无] C++
1635 Database Problem: Link - - - -
1636 Sort Array by Increasing Frequency [无] C++
1637 Widest Vertical Area Between Two Points Containing No Points [无] C++
1638 Count Substrings That Differ by One Character [无] C++
1639 Number of Ways to Form a Target String Given a Dictionary [无] C++
1640 Check Array Formation Through Concatenation solution C++
1641 Count Sorted Vowel Strings solution C++
1642 Furthest Building You Can Reach [无] C++
1643 Kth Smallest Instructions [无] C++
1644 Lowest Common Ancestor of a Binary Tree II [无] C++
1645 Database Problem: Link - - - -
1646 Get Maximum in Generated Array solution C++
1647 Minimum Deletions to Make Character Frequencies Unique [无] C++
1648 Sell Diminishing-Valued Colored Balls [无] C++
1649 Create Sorted Array through Instructions solution
[缺:树状数组;归并]
C++
1650 Lowest Common Ancestor of a Binary Tree III [无] C++
1651 Database Problem: Link - - - -
1652 Defuse the Bomb [无] C++
1653 Minimum Deletions to Make String Balanced [无] C++
1654 Minimum Jumps to Reach Home [无] C++
1655 Distribute Repeating Integers [无] C++
1656 Design an Ordered Stream [无] C++
1657 Determine if Two Strings Are Close solution C++
1658 Minimum Operations to Reduce X to Zero solution C++
1659 Maximize Grid Happiness [无] C++ Java
1660 Correct a Binary Tree [无] C++
1661 Database Problem: Link - - - -
1662 Check If Two String Arrays are Equivalent solution C++
1663 Smallest String With A Given Numeric Value solution C++
1664 Ways to Make a Fair Array [无] C++
1665 Minimum Initial Energy to Finish Tasks [无] C++
1666 Change the Root of a Binary Tree [无] C++
1667 Database Problem: Link - - - -
1668 Maximum Repeating Substring [无] C++
1669 Merge In Between Linked Lists [无] C++
1670 Design Front Middle Back Queue [无] C++
1671 Minimum Number of Removals to Make Mountain Array [无] C++
1672 Richest Customer Wealth [无] C++
1673 Find the Most Competitive Subsequence solution C++
1674 Minimum Moves to Make Array Complementary [无] C++
1675 Minimize Deviation in Array solution C++
1676 Lowest Common Ancestor of a Binary Tree IV [无] C++
1677 Database Problem: Link - - - -
1678 Goal Parser Interpretation [无] C++
1679 Max Number of K-Sum Pairs solution C++
1680 Concatenation of Consecutive Binary Numbers solution C++
1681 Minimum Incompatibility [无] C++
1682 Longest Palindromic Subsequence II [无] C++
1683 Database Problem: Link - - - -
1684 Count the Number of Consistent Strings [无] C++
1685 Sum of Absolute Differences in a Sorted Array [无] C++
1686 Stone Game VI [无] C++
1687 Delivering Boxes from Storage to Ports [无]
[缺:dp + 优化]
C++
1688 Count of Matches in Tournament C++
1689 Partitioning Into Minimum Number Of Deci-Binary Numbers solution C++
1690 Stone Game VII solution
[缺:记忆化搜索;DP 空间优化]
C++
1691 Maximum Height by Stacking Cuboids [无] C++
1692 Count Ways to Distribute Candies [无] C++
1693 Database Problem: Link - - - -
1694 Reformat Phone Number [无] C++
1695 Maximum Erasure Value [无] C++
1696 Jump Game VI [无] C++
1697 Checking Existence of Edge Length Limited Paths [无] C++
1698 Number of Distinct Substrings in a String [无] C++
1699 Database Problem: Link - - - -
1700 Number of Students Unable to Eat Lunch [无] C++
1701 Average Waiting Time [无] C++
1702 Maximum Binary String After Change [无] C++
1703 Minimum Adjacent Swaps for K Consecutive Ones [无] C++
1704 Determine if String Halves Are Alike solution C++
1705 Maximum Number of Eaten Apples solution C++
1706 Where Will the Ball Fall [无] C++
1707 Maximum XOR With an Element From Array [无] C++
1708 Largest Subarray Length K [无] C++
1709 Database Problem: Link - - - -
1710 Maximum Units on a Truck solution C++
1711 Count Good Meals [无] C++
1712 Ways to Split Array Into Three Subarrays solution C++
1713 Minimum Operations to Make a Subsequence [无] C++
1714 Sum Of Special Evenly-Spaced Elements In Array [无] C++
1715 Database Problem: Link - - - -
1716 Calculate Money in Leetcode Bank [无] C++
1717 Maximum Score From Removing Substrings [无] C++
1718 Construct the Lexicographically Largest Valid Sequence [无] C++
1719 Number Of Ways To Reconstruct A Tree [无] C++
1720 Decode XORed Array [无] C++
1721 Swapping Nodes in a Linked List [无] C++
1722 Minimize Hamming Distance After Swap Operations [无] C++
1723 Find Minimum Time to Finish All Jobs [无] C++
1724 Checking Existence of Edge Length Limited Paths II [无] C++
1725 Number Of Rectangles That Can Form The Largest Square [无] C++
1726 Tuple with Same Product [无] C++
1727 Largest Submatrix With Rearrangements [无] C++
1728 Cat and Mouse II [无] C++
1729 Database Problem: Link - - - -
1730 Shortest Path to Get Food [无] C++
1731 Database Problem: Link - - - -
1732 Find the Highest Altitude [无] C++
1733 Minimum Number of People to Teach [无] C++
1734 Decode XORed Permutation [无] C++
1735 Count Ways to Make Array With Product [无] C++
1736 Latest Time by Replacing Hidden Digits [无] C++
1737 Change Minimum Characters to Satisfy One of Three Conditions [无] C++
1738 Find Kth Largest XOR Coordinate Value [无] C++
1739 Building Boxes [无]
[缺:二分;数学]
C++
1740 Find Distance in a Binary Tree [无]
[缺:LCA]
C++
1741 Database Problem: Link - - - -
1742 Maximum Number of Balls in a Box [无] C++
1743 Restore the Array From Adjacent Pairs [无] C++
1744 Can You Eat Your Favorite Candy on Your Favorite Day? [无] C++
1745 Palindrome Partitioning IV [无] C++
1746 Maximum Subarray Sum After One Operation [无] C++
1747 Database Problem: Link - - - -
1748 Sum of Unique Elements [无] C++
1749 Maximum Absolute Sum of Any Subarray [无] C++
1750 Minimum Length of String After Deleting Similar Ends [无] C++
1751 Maximum Number of Events That Can Be Attended II [无] C++
1752 Check if Array Is Sorted and Rotated [无] C++
1753 Maximum Score From Removing Stones [无] C++
1754 Largest Merge Of Two Strings [无] C++
1755 Closest Subsequence Sum [无] C++
1756 Design Most Recently Used Queue [无]
[缺:线段树,sqrt 分解]
C++
1757 Database Problem: Link - - - -
1758 Minimum Changes To Make Alternating Binary String [无] C++
1759 Count Number of Homogenous Substrings [无] C++
1760 Minimum Limit of Balls in a Bag [无] C++
1761 Minimum Degree of a Connected Trio in a Graph [无] C++
1762 Buildings With an Ocean View [无] C++
1763 Longest Nice Substring [无] C++
1764 Form Array by Concatenating Subarrays of Another Array
1765 Map of Highest Peak [无] C++
1766 Tree of Coprimes [无] C++
1767 Database Problem: Link - - - -
1768 Merge Strings Alternately [无] C++
1769 Minimum Number of Operations to Move All Balls to Each Box [无] C++
1770 Maximum Score from Performing Multiplication Operations [无] C++
1771 Maximize Palindrome Length From Subsequences [无] C++
1772 Sort Features by Popularity [无] C++
1773 Count Items Matching a Rule [无] C++
1774 Closest Dessert Cost [无] C++
1775 Equal Sum Arrays With Minimum Number of Operations [无] C++
1776 Car Fleet II [无]
[缺:stack]
C++
1777 Database Problem: Link - - - -
1778 Shortest Path in a Hidden Grid [无] C++
1779 Find Nearest Point That Has the Same X or Y Coordinate [无] C++
1780 Check if Number is a Sum of Powers of Three [无] C++
1781 Sum of Beauty of All Substrings [无] C++
1782 Count Pairs Of Nodes [无] C++
1783 Database Problem: Link - - - -
1784 Check if Binary String Has at Most One Segment of Ones [无] C++
1785 Minimum Elements to Add to Form a Given Sum [无] C++
1786 Number of Restricted Paths From First to Last Node [无] C++
1787 Make the XOR of All Segments Equal to Zero [无] C++
1788 Maximize the Beauty of the Garden [无] C++
1789 Database Problem: Link - - - -
1790 Check if One String Swap Can Make Strings Equal [无] C++
1791 Find Center of Star Graph [无] C++
1792 Maximum Average Pass Ratio [无] C++
1793 Maximum Score of a Good Subarray [无] C++
1794 Count Pairs of Equal Substrings With Minimum Difference [无] C++
1795 Database Problem: Link - - - -
1796 Second Largest Digit in a String [无] C++
1797 Design Authentication Manager [无] C++
1798 Maximum Number of Consecutive Values You Can Make [无] C++
1799 Maximize Score After N Operations [无] C++
1800 Maximum Ascending Subarray Sum [无] C++
1801 Number of Orders in the Backlog [无] C++
1802 Maximum Value at a Given Index in a Bounded Array [无] C++
1803 Count Pairs With XOR in a Range [无] C++
1804 Implement Trie II (Prefix Tree) [无] C++
1805 Number of Different Integers in a String [无] C++
1806 Minimum Number of Operations to Reinitialize a Permutation [无]
[缺:数学方法]
C++
1807 Evaluate the Bracket Pairs of a String [无] C++
1808 Maximize Number of Nice Divisors [无] C++
1809 Database Problem: Link - - - -
1810 Minimum Path Cost in a Hidden Grid [无] C++
1811 Database Problem: Link - - - -
1812 Determine Color of a Chessboard Square [无] C++
1813 Sentence Similarity III [无] C++
1814 Count Nice Pairs in an Array [无] C++
1815 Maximum Number of Groups Getting Fresh Donuts [无] C++
1816 Truncate Sentence [无] C++
1817 Finding the Users Active Minutes [无] C++
1818 Minimum Absolute Sum Difference [无] C++
1819 Number of Different Subsequences GCDs [无] C++
1820 Maximum Number of Accepted Invitations [无] C++
1821 Database Problem: Link - - - -
1822 Sign of the Product of an Array [无] C++
1823 Find the Winner of the Circular Game [无] C++
1824 Minimum Sideway Jumps [无]
[缺:DP]
C++
1825 Finding MK Average [无]
[缺:线段树,AVL]
C++
1826 Faulty Sensor [无] C++
1827 Minimum Operations to Make the Array Increasing [无] C++
1828 Queries on Number of Points Inside a Circle [无] C++
1829 Maximum XOR for Each Query [无] C++
1830 Minimum Number of Operations to Make String Sorted [无] C++
1831 Database Problem: Link - - - -
1832 Check if the Sentence Is Pangram [无] C++
1833 Maximum Ice Cream Bars [无] C++
1834 Single-Threaded CPU [无] C++
1835 Find XOR Sum of All Pairs Bitwise AND [无]
[缺:数学方法]
C++
1836 Remove Duplicates From an Unsorted Linked List [无] C++
1837 Sum of Digits in Base K [无] C++
1838 Frequency of the Most Frequent Element [无] C++
1839 Longest Substring Of All Vowels in Order [无] C++
1840 Maximum Building Height [无] C++
1841 Database Problem: Link - - - -
1842 Next Palindrome Using Same Digits [无] C++
1843 Database Problem: Link - - - -
1844 Replace All Digits with Characters [无] C++
1845 Seat Reservation Manager [无] C++
1846 Maximum Element After Decreasing and Rearranging [无] C++
1847 Closest Room [无] C++
1848 Minimum Distance to the Target Element [无] C++
1849 Splitting a String Into Descending Consecutive Values [无] C++
1850 Minimum Adjacent Swaps to Reach the Kth Smallest Number [无] C++
1851 Minimum Interval to Include Each Query [无] C++
1852 Distinct Numbers in Each Subarray [无] C++
1853 Database Problem: Link - - - -
1854 Maximum Population Year [无] C++
1855 Maximum Distance Between a Pair of Values [无] C++
1856 Maximum Subarray Min-Product [无] C++
1857 Largest Color Value in a Directed Graph [无] C++
1858 Longest Word With All Prefixes [无] C++
1859 Sorting the Sentence [无] C++
1860 Incremental Memory Leak [无] C++
1861 Rotating the Box [无] C++
1862 Sum of Floored Pairs [无] C++
1863 Sum of All Subset XOR Totals [无]
[缺:数学解]
C++
1864 Minimum Number of Swaps to Make the Binary String Alternating [无] C++
1865 Finding Pairs With a Certain Sum [无] C++
1866 Number of Ways to Rearrange Sticks With K Sticks Visible [无] C++
1867 Database Problem: Link - - - -
1868 Product of Two Run-Length Encoded Arrays [无] C++
1869 Longer Contiguous Segments of Ones than Zeros [无] C++
1870 Minimum Speed to Arrive on Time [无] C++
1871 Jump Game VII [无] C++
1872 Stone Game VIII solution
1873 Database Problem: Link - - - -
1874 Minimize Product Sum of Two Arrays [无] C++
1875 Database Problem: Link - - - -
1876 Substrings of Size Three with Distinct Characters [无] C++
1877 Minimize Maximum Pair Sum in Array [无] C++
1878 Get Biggest Three Rhombus Sums in a Grid [无] C++
1879 Minimum XOR Sum of Two Arrays [无]
[缺:DP]
C++
1880 Check if Word Equals Summation of Two Words [无] C++
1881 Maximum Value after Insertion [无] C++
1882 Process Tasks Using Servers [无] C++
1883 Minimum Skips to Arrive at Meeting On Time [无]
[缺:DP]
C++
1884 Egg Drop With 2 Eggs and N Floors [无]
[缺:O(1) 数学]
C++
1885 Count Pairs in Two Arrays [无] C++
1886 Determine Whether Matrix Can Be Obtained By Rotation [无] C++
1887 Reduction Operations to Make the Array Elements Equal [无] C++
1888 Minimum Number of Flips to Make the Binary String Alternating [无] C++
1889 Minimum Space Wasted From Packaging [无] C++
1890 Database Problem: Link - - - -
1891 Cutting Ribbons [无] C++
1892 Database Problem: Link - - - -
1893 Check if All the Integers in a Range Are Covered [无] C++
1894 Find the Student that Will Replace the Chalk [无] C++
1895 Largest Magic Square [无] C++
1896 Minimum Cost to Change the Final Value of Expression [无] C++
1897 Redistribute Characters to Make All Strings Equal [无] C++
1898 Maximum Number of Removable Characters [无] C++
1899 Merge Triplets to Form Target Triplet [无] C++
1900 The Earliest and Latest Rounds Where Players Compete [无] C++
1901 Find a Peak Element II [无] C++
1902 Depth of BST Given Insertion Order [无] C++
1903 Largest Odd Number in String [无] C++
1904 The Number of Full Rounds You Have Played [无] C++
1905 Count Sub Islands [无] C++
1906 Minimum Absolute Difference Queries [无]
[缺:二分]
C++
1907 Database Problem: Link - - - -
1908 Game of Nim [无]
[缺:dp]
C++
1909 Remove One Element to Make the Array Strictly Increasing [无] C++
1910 Remove All Occurrences of a Substring [无] C++
1911 Maximum Alternating Subsequence Sum [无]
[缺:dp]
C++
1912 Design Movie Rental System [无] C++
1913 Maximum Product Difference Between Two Pairs [无] C++
1914 Cyclically Rotating a Grid [无] C++
1915 Number of Wonderful Substrings [无] C++
1916 Count Ways to Build Rooms in an Ant Colony [无] C++
1917 Database Problem: Link - - - -
1918 Kth Smallest Subarray Sum [无] C++
1919 Database Problem: Link - - - -
1920 Build Array from Permutation [无] C++
1921 Eliminate Maximum Number of Monsters [无] C++
1922 Count Good Numbers [无] C++
1923 Longest Common Subpath [无]
[缺:后缀树组+LCP
滚动哈希两次碰撞]
C++
1924 Erect the Fence II [无] C++
1925 Count Square Sum Triples [无] C++
1926 Nearest Exit from Entrance in Maze [无] C++
1927 Sum Game [无] C++
1928 Minimum Cost to Reach Destination in Time [无] C++
1929 Concatenation of Array [无] C++
1930 Unique Length-3 Palindromic Subsequences [无] C++
1931 Painting a Grid With Three Different Colors [无] C++
1932 Merge BSTs to Create Single BST [无] C++
1933 Check if String Is Decomposable Into Value-Equal Substrings [无] C++
1934 Database Problem: Link - - - -
1935 Maximum Number of Words You Can Type [无] C++
1936 Add Minimum Number of Rungs [无] C++
1937 Maximum Number of Points with Cost [无] C++
1938 Maximum Genetic Difference Query [无] C++
1939 Database Problem: Link - - - -
1940 Longest Common Subsequence Between Sorted Arrays [无] C++
1941 Check if All Characters Have Equal Number of Occurrences [无] C++
1942 The Number of the Smallest Unoccupied Chair [无] C++
1943 Describe the Painting [无] C++
1944 Number of Visible People in a Queue [无] C++
1945 Sum of Digits of String After Convert [无] C++
1946 Largest Number After Mutating Substring [无] C++
1947 Maximum Compatibility Score Sum [无] C++
1948 Delete Duplicate Folders in System [无] C++
1949 Database Problem: Link - - - -
1950 Maximum of Minimum Values in All Subarrays [无] C++
1951 Database Problem: Link - - - -
1952 Three Divisors [无] C++
1953 Maximum Number of Weeks for Which You Can Work [无] C++
1954 Minimum Garden Perimeter to Collect Enough Apples [无] C++
1955 Count Number of Special Subsequences [无] C++
1956 Minimum Time For K Virus Variants to Spread [无] C++
1957 Delete Characters to Make Fancy String [无] C++
1958 Check if Move is Legal [无] C++
1959 Minimum Total Space Wasted With K Resizing Operations [无] C++
1960 Maximum Product of the Length of Two Palindromic Substrings [无] C++
1961 Check If String Is a Prefix of Array [无] C++
1962 Remove Stones to Minimize the Total [无] C++
1963 Minimum Number of Swaps to Make the String Balanced [无] C++
1964 Find the Longest Valid Obstacle Course at Each Position [无] C++
1965 Database Problem: Link - - - -
1966 Binary Searchable Numbers in an Unsorted Array [无] C++
1967 Number of Strings That Appear as Substrings in Word [无] C++
1968 Array With Elements Not Equal to Average of Neighbors [无] C++
1969 Minimum Non-Zero Product of the Array Elements [无] C++
1970 Last Day Where You Can Still Cross [无] C++
1971 Find if Path Exists in Graph [无] C++
1972 Database Problem: Link - - - -
1973 Count Nodes Equal to Sum of Descendants [无] C++
1974 Minimum Time to Type Word Using Special Typewriter [无] C++
1975 Maximum Matrix Sum [无] C++
1976 Number of Ways to Arrive at Destination [无] C++
1977 Number of Ways to Separate Numbers [无] C++
1978 Database Problem: Link - - - -
1979 Find Greatest Common Divisor of Array [无] C++
1980 Find Unique Binary String [无] C++
1981 Minimize the Difference Between Target and Chosen Elements [无] C++
1982 Find Array Given Subset Sums [无] C++
1983 Widest Pair of Indices With Equal Range Sum [无] C++
1984 Minimum Difference Between Highest and Lowest of K Scores [无] C++
1985 Find the Kth Largest Integer in the Array [无] C++
1986 Minimum Number of Work Sessions to Finish the Tasks [无] C++
1987 Number of Unique Good Subsequences [无] C++
1988 Database Problem: Link - - - -
1989 Maximum Number of People That Can Be Caught in Tag [无] C++
1990 Database Problem: Link - - - -
1991 Find the Middle Index in Array [无] C++
1992 Find All Groups of Farmland [无] C++
1993 Operations on Tree [无] C++
1994 The Number of Good Subsets [无] C++
1995 Count Special Quadruplets [无] C++
1996 The Number of Weak Characters in the Game [无] C++
1997 First Day Where You Have Been in All the Rooms [无] C++
1998 GCD Sort of an Array [无] C++
1999 Smallest Greater Multiple Made of Two Digits [无] C++
2000 Reverse Prefix of Word [无] C++
2001 Number of Pairs of Interchangeable Rectangles [无] C++
2002 Maximum Product of the Length of Two Palindromic Subsequences [无] C++
2003 Smallest Missing Genetic Value in Each Subtree [无] C++
2004 Database Problem: Link - - - -
2005 Subtree Removal Game with Fibonacci Tree [无] C++
2006 Count Number of Pairs With Absolute Difference K [无] C++
2007 Find Original Array From Doubled Array [无] C++
2008 Maximum Earnings From Taxi [无] C++
2009 Minimum Number of Operations to Make Array Continuous [无] C++
2010 Database Problem: Link - - - -
2011 Final Value of Variable After Performing Operations [无] C++
2012 Sum of Beauty in the Array [无] C++
2013 Detect Squares [无] C++
2014 Longest Subsequence Repeated k Times [无] C++
2015 Average Height of Buildings in Each Segment [无] C++
2016 Maximum Difference Between Increasing Elements [无] C++
2017 Grid Game [无] C++
2018 Check if Word Can Be Placed In Crossword [无] C++
2019 The Score of Students Solving Math Expression [无] C++
2020 Database Problem: Link - - - -
2021 Brightest Position on Street [无] C++
2022 Convert 1D Array Into 2D Array [无] C++
2023 Number of Pairs of Strings With Concatenation Equal to Target [无] C++
2024 Maximize the Confusion of an Exam [无] C++
2025 Maximum Number of Ways to Partition an Array [无] C++
2026 Database Problem: Link - - - -
2027 Minimum Moves to Convert String [无] C++
2028 Find Missing Observations [无] C++
2029 Stone Game IX [无] C++
2030 Smallest K-Length Subsequence With Occurrences of a Letter [无] C++
2031 Count Subarrays With More Ones Than Zeros [缺:更简单的解法] C++
2032 Two Out of Three [无] C++
2033 Minimum Operations to Make a Uni-Value Grid [无] C++
2034 Stock Price Fluctuation [无] C++
2035 Partition Array Into Two Arrays to Minimize Sum Difference [无] C++
2036 Maximum Alternating Subarray Sum [无] c++
2037 Minimum Number of Moves to Seat Everyone [无] C++
2038 Remove Colored Pieces if Both Neighbors are the Same Color [无] C++
2039 The Time When the Network Becomes Idle [无] C++
2040 Kth Smallest Product of Two Sorted Arrays [无] C++
2041 Database Problem: Link - - - -
2042 Check if Numbers Are Ascending in a Sentence [无] C++
2043 Simple Bank System [无] C++
2044 Count Number of Maximum Bitwise-OR Subsets [无] C++
2045 Second Minimum Time to Reach Destination [无] C++
2046 Sort Linked List Already Sorted Using Absolute Values [无] C++
2047 Number of Valid Words in a Sentence [无] C++
2048 Next Greater Numerically Balanced Number [无] C++
2049 Count Nodes With the Highest Score [无] C++
2050 Parallel Courses III [无] C++
2051 Database Problem: Link - - - -
2052 Minimum Cost to Separate Sentence Into Rows [无] C++
2053 Kth Distinct String in an Array [无] C++
2054 Two Best Non-Overlapping Events [无] C++
2055 Plates Between Candles [无] C++
2056 Number of Valid Move Combinations On Chessboard [无] C++
2057 Smallest Index With Equal Value [无] C++
2058 Find the Minimum and Maximum Number of Nodes Between Critical Points [无] C++
2059 Minimum Operations to Convert Number [无] C++
2060 Check if an Original String Exists Given Two Encoded Strings [无] C++
2061 Number of Spaces Cleaning Robot Cleaned [无] C++
2062 Count Vowel Substrings of a String [无] C++
2063 Vowels of All Substrings [无] C++
2064 Minimized Maximum of Products Distributed to Any Store [无] C++
2065 Maximum Path Quality of a Graph [无] C++
2066 Database Problem: Link - - - -
2067 Number of Equal Count Substrings [无] C++
2068 Check Whether Two Strings are Almost Equivalent [无] C++
2069 Walking Robot Simulation II [无] C++
2070 Most Beautiful Item for Each Query [无] C++
2071 Maximum Number of Tasks You Can Assign [无] C++
2072 Database Problem: Link - - - -
2073 Time Needed to Buy Tickets [无] C++
2074 Reverse Nodes in Even Length Groups [无] C++
2075 Decode the Slanted Ciphertext [无] C++
2076 Process Restricted Friend Requests [无] C++
2077 Paths in Maze That Lead to Same Room [无] C++
2078 Two Furthest Houses With Different Colors [无] C++
2079 Watering Plants [无] C++
2080 Range Frequency Queries [无] C++
2081 Sum of k-Mirror Numbers [无] C++
2082 Database Problem: Link - - - -
2083 Substrings That Begin and End With the Same Letter [无] C++
2084 Database Problem: Link - - - -
2085 Count Common Words With One Occurrence [无] C++
2086 Minimum Number of Buckets Required to Collect Rainwater from Houses [无] C++
2087 Minimum Cost Homecoming of a Robot in a Grid [无] C++
2088 Count Fertile Pyramids in a Land [无] C++
2089 Find Target Indices After Sorting Array [无] C++
2090 K Radius Subarray Averages [无] C++
2091 Removing Minimum and Maximum From Array [无] C++
2092 Find All People With Secret [无] C++
2093 Minimum Cost to Reach City With Discounts [无] C++
2094 Finding 3-Digit Even Numbers [无] C++
2095 Delete the Middle Node of a Linked List [无] C++
2096 Step-By-Step Directions From a Binary Tree Node to Another [无] C++
2097 Valid Arrangement of Pairs [无] C++
2098 Subsequence of Size K With the Largest Even Sum [无] C++
2099 Find Subsequence of Length K With the Largest Sum [无] C++
2100 Find Good Days to Rob the Bank [无] C++
2101 Detonate the Maximum Bombs [无] C++
2102 Sequentially Ordinal Rank Tracker [无] C++
2103 Rings and Rods [无] C++
2104 Sum of Subarray Ranges [无] C++
2105 Watering Plants II [无] C++
2106 Maximum Fruits Harvested After at Most K Steps [无] C++
2107 Number of Unique Flavors After Sharing K Candies [无] C++
2108 Find First Palindromic String in the Array [无] C++
2109 Adding Spaces to a String [无] C++
2110 Number of Smooth Descent Periods of a Stock [无] C++
2111 Minimum Operations to Make the Array K-Increasing [无] C++
2112 Database Problem: Link - - - -
2113 Elements in Array After Removing and Replacing Elements [无] C++
2114 Maximum Number of Words Found in Sentences [无] C++
2115 Find All Possible Recipes from Given Supplies [无] C++
2116 Check if a Parentheses String Can Be Valid [无] C++
2117 Abbreviating the Product of a Range [无] C++
2118 Database Problem: Link - - - -
2119 A Number After a Double Reversal [无] C++
2120 Execution of All Suffix Instructions Staying in a Grid [无] C++
2121 Intervals Between Identical Elements [无] C++
2122 Recover the Original Array [无] C++
2123 Minimum Operations to Remove Adjacent Ones in Matrix [无] C++
2124 Check if All A's Appears Before All B's [无] C++
2125 Number of Laser Beams in a Bank [无] C++
2126 Destroying Asteroids [无] C++
2127 Maximum Employees to Be Invited to a Meeting [无] C++
2128 Remove All Ones With Row and Column Flips C++
2129 Capitalize the Title [无] C++
2130 Maximum Twin Sum of a Linked List [无] C++
2131 Longest Palindrome by Concatenating Two Letter Words [无] C++
2132 Stamping the Grid [缺:二维差分数组] C++
2133 Check if Every Row and Column Contains All Numbers [无] C++
2134 Minimum Swaps to Group All 1's Together II [无] C++
2135 Count Words Obtained After Adding a Letter [无] C++
2136 Earliest Possible Day of Full Bloom [无] C++
2137 Pour Water Between Buckets to Make Water Levels Equal [无] C++
2138 Divide a String Into Groups of Size k [无] C++
2139 Minimum Moves to Reach Target Score [无] C++
2140 Solving Questions With Brainpower [无] C++
2141 Maximum Running Time of N Computers [无] C++
2142 Database Problem: Link - - - -
2143 Choose Numbers From Two Arrays in Range [无] C++
2144 Minimum Cost of Buying Candies With Discount [无] C++
2145 Count the Hidden Sequences [无] C++
2146 K Highest Ranked Items Within a Price Range [无] C++
2147 Number of Ways to Divide a Long Corridor [无]
[缺:数学更简单的写法;dp]
C++
2148 Count Elements With Strictly Smaller and Greater Elements [无] C++
2149 Rearrange Array Elements by Sign [无] C++
2150 Find All Lonely Numbers in the Array [无] C++
2151 Maximum Good People Based on Statements [无] C++
2152 Minimum Number of Lines to Cover Points [无] C++
2153 Database Problem: Link - - - -
2154 Keep Multiplying Found Values by Two [无] C++
2155 All Divisions With the Highest Score of a Binary Array [无] C++
2156 Find Substring With Given Hash Value [无] C++
2157 Groups of Strings [无] C++
2158 Amount of New Area Painted Each Day [无] C++
2159 Database Problem: Link - - - -
2160 Minimum Sum of Four Digit Number After Splitting Digits [无] C++
2161 Partition Array According to Given Pivot [无] C++
2162 Minimum Cost to Set Cooking Time [无] C++
2163 Minimum Difference in Sums After Removal of Elements [无] C++
2164 Sort Even and Odd Indices Independently [无] C++
2165 Smallest Value of the Rearranged Number [无] C++
2166 Design Bitset [无] C++
2167 Minimum Time to Remove All Cars Containing Illegal Goods [无] C++
2168 Unique Substrings With Equal Digit Frequency [无] C++
2169 Count Operations to Obtain Zero [无] C++
2170 Minimum Operations to Make the Array Alternating [无] C++
2171 Removing Minimum Number of Magic Beans [无] C++
2172 Maximum AND Sum of Array [无] C++
2173 Database Problem: Link - - - -
2174 Remove All Ones With Row and Column Flips II [无] C++
2175 Database Problem: Link - - - -
2176 Count Equal and Divisible Pairs in an Array [无] C++
2177 Find Three Consecutive Integers That Sum to a Given Number [无] C++
2178 Maximum Split of Positive Even Integers [无] C++
2179 Count Good Triplets in an Array [无] C++
2180 Count Integers With Even Digit Sum [无] C++
2181 Merge Nodes in Between Zeros [无] C++
2182 Construct String With Repeat Limit C++
2183 Count Array Pairs Divisible by K [无] C++
2184 Number of Ways to Build Sturdy Brick Wall [无] C++
2185 Counting Words With a Given Prefix [无] C++
2186 Minimum Number of Steps to Make Two Strings Anagram II [无] C++
2187 Minimum Time to Complete Trips [无] C++
2188 Minimum Time to Finish the Race [无] C++
2189 Number of Ways to Build House of Cards [无] C++
2190 Most Frequent Number Following Key In an Array [无] C++
2191 Sort the Jumbled Numbers [无] C++
2192 All Ancestors of a Node in a Directed Acyclic Graph [无] C++
2193 Minimum Number of Moves to Make Palindrome [无] C++
2194 Cells in a Range on an Excel Sheet [无] C++
2195 Append K Integers With Minimal Sum [无] C++
2196 Create Binary Tree From Descriptions [无] C++
2197 Replace Non-Coprime Numbers in Array [无] C++
2198 Number of Single Divisor Triplets [无] C++
2199 Database Problem: Link - - - -
2200 Find All K-Distant Indices in an Array [无] C++
2201 Count Artifacts That Can Be Extracted [无] C++
2202 Maximize the Topmost Element After K Moves [无] C++
2203 Minimum Weighted Subgraph With the Required Paths [无] C++
2204 Distance to a Cycle in Undirected Graph [无] C++
2205 Database Problem: Link - - - -
2206 Divide Array Into Equal Pairs [无] C++
2207 Maximize Number of Subsequences in a String [无] C++
2208 Minimum Operations to Halve Array Sum [无] C++
2209 Minimum White Tiles After Covering With Carpets [无] C++
2210 Count Hills and Valleys in an Array [无] C++
2211 Count Collisions on a Road [无] C++
2212 Maximum Points in an Archery Competition [无] C++
2213 Longest Substring of One Repeating Character [无] C++
2214 Minimum Health to Beat Game [无] C++
2215 Find the Difference of Two Arrays [无] C++
2216 Minimum Deletions to Make Array Beautiful [无] C++
2217 Find Palindrome With Fixed Length [无] C++
2218 Maximum Value of K Coins From Piles [无] C++
2219 Maximum Sum Score of Array [无] C++
2220 Minimum Bit Flips to Convert Number [无] C++
2221 Find Triangular Sum of an Array [无] C++
2222 Number of Ways to Select Buildings [无] C++
2223 Sum of Scores of Built Strings [无] C++
2224 Minimum Number of Operations to Convert Time [无] C++
2225 Find Players With Zero or One Losses [无] C++
2226 Maximum Candies Allocated to K Children [无] C++
2227 Encrypt and Decrypt Strings [无] C++
2228 Database Problem: Link - - - -
2229 Check if an Array Is Consecutive [无] C++
2230 Database Problem: Link - - - -
2231 Largest Number After Digit Swaps by Parity [无] C++
2232 Minimize Result by Adding Parentheses to Expression [无] C++
2233 Maximum Product After K Increments [无] C++
2234 Maximum Total Beauty of the Gardens [无] C++
2235 Add Two Integers [无] C++
2236 Root Equals Sum of Children [无] C++
2237 Count Positions on Street With Required Brightness [无] C++
2238 Database Problem: Link - - - -
2239 Find Closest Number to Zero [无] C++
2240 Number of Ways to Buy Pens and Pencils [无] C++
2241 Design an ATM Machine [无] C++
2242 Maximum Score of a Node Sequence [无] C++
2243 Calculate Digit Sum of a String [无] C++
2244 Minimum Rounds to Complete All Tasks [无] C++
2245 Maximum Trailing Zeros in a Cornered Path [无] C++
2246 Longest Path With Different Adjacent Characters [无] C++
2247 Maximum Cost of Trip With K Highways [无] C++
2248 Intersection of Multiple Arrays [无] C++
2249 Count Lattice Points Inside a Circle [无] C++
2250 Count Number of Rectangles Containing Each Point [无] C++
2251 Number of Flowers in Full Bloom [无] C++
2252 Database Problem: Link - - - -
2253 Database Problem: Link - - - -
2254 Design Video Sharing Platform [无] C++
2255 Count Prefixes of a Given String [无] C++
2256 Minimum Average Difference [无] C++
2257 Count Unguarded Cells in the Grid [无] C++
2258 Escape the Spreading Fire [无] C++
2259 Remove Digit From Number to Maximize Result [无] C++
2260 Minimum Consecutive Cards to Pick Up [无] C++
2261 K Divisible Elements Subarrays [无] C++
2262 Total Appeal of A String [无] C++
2263 Make Array Non-decreasing or Non-increasing [无] C++
2264 Largest 3-Same-Digit Number in String [无] C++
2265 Count Nodes Equal to Average of Subtree [无] C++
2266 Count Number of Texts [无] C++
2267 Check if There Is a Valid Parentheses String Path [无] C++
2268 Minimum Number of Keypresses [无] C++
2269 Find the K-Beauty of a Number [无] C++
2270 Number of Ways to Split Array [无] C++
2271 Maximum White Tiles Covered by a Carpet [无] C++
2272 Substring With Largest Variance [无] C++
2273 Find Resultant Array After Removing Anagrams [无] C++
2274 Maximum Consecutive Floors Without Special Floors [无] C++
2275 Largest Combination With Bitwise AND Greater Than Zero [无] C++
2276 Count Integers in Intervals [无] C++
2277 Closest Node to Path in Tree [无] C++
2278 Percentage of Letter in String [无] C++
2279 Maximum Bags With Full Capacity of Rocks [无] C++
2280 Minimum Lines to Represent a Line Chart [无] C++
2281 Sum of Total Strength of Wizards [无] C++
2283 Check if Number Has Equal Digit Count and Digit Value [无] C++
2284 Sender With Largest Word Count [无] C++
2285 Maximum Total Importance of Roads [无] C++
2286 Booking Concert Tickets in Groups [无] C++
2287 Rearrange Characters to Make Target String [无] C++
2288 Apply Discount to Prices [无] C++
2289 Steps to Make Array Non-decreasing [无]
[缺:用 C++ STL list]
C++
2290 Minimum Obstacle Removal to Reach Corner [无] C++
2291 Maximum Profit From Trading Stocks [无] C++
2292 Database Problem: Link - - - -
2293 Min Max Game [无] C++
2294 Partition Array Such That Maximum Difference Is K [无] C++
2295 Replace Elements in an Array [无] C++
2296 Design a Text Editor [无] C++
2297 Jump Game IX [无] C++
2298 Database Problem: Link - - - -
2299 Strong Password Checker II [无] C++
2300 Successful Pairs of Spells and Potions [无] C++
2301 Match Substring After Replacement [无] C++
2302 Count Subarrays With Score Less Than K [无] C++
2303 Calculate Amount Paid in Taxes [无] C++
2304 Minimum Path Cost in a Grid [无] C++
2305 Fair Distribution of Cookies [无] C++
2306 Naming a Company [无] C++
2308 Database Problem: Link - - - -
2309 Greatest English Letter in Upper and Lower Case [无] C++
2310 Sum of Numbers With Units Digit K [无] C++
2312 Selling Pieces of Wood [无] C++
2313 Minimum Flips in Binary Tree to Get Result [无] C++
2314 Database Problem: Link - - - -
2315 Count Asterisks [无] C++
2316 Count Unreachable Pairs of Nodes in an Undirected Graph [无] C++
2317 Maximum XOR After Operations [无] C++
2318 Number of Distinct Roll Sequences [无] C++
2319 Check if Matrix Is X-Matrix [无] C++
2320 Count Number of Ways to Place Houses [无] C++
2321 Maximum Score Of Spliced Array [无] C++
2322 Minimum Score After Removals on a Tree [无] C++
2323 Find Minimum Time to Finish All Jobs II [无] C++
2324 Database Problem: Link - - - -
2325 Decode the Message [无] C++
2326 Spiral Matrix IV [无] C++
2327 Number of People Aware of a Secret [无] C++
2328 Number of Increasing Paths in a Grid [无] C++
2329 Database Problem: Link - - - -
2330 Valid Palindrome IV [无] C++
2331 Evaluate Boolean Binary Tree [无] C++
2332 The Latest Time to Catch a Bus [无] C++
2333 Minimum Sum of Squared Difference [无] C++
2334 Subarray With Elements Greater Than Varying Threshold [无] C++
2335 Minimum Amount of Time to Fill Cups [无] C++
2336 Smallest Number in Infinite Set [无] C++
2337 Move Pieces to Obtain a String [无] C++
2338 Count the Number of Ideal Arrays [无] C++
2339 Database Problem: Link - - - -
2340 Minimum Adjacent Swaps to Make a Valid Array [无] C++
2341 Maximum Number of Pairs in Array [无] C++
2342 Max Sum of a Pair With Equal Sum of Digits [无] C++
2343 Query Kth Smallest Trimmed Number [无] C++
2344 Minimum Deletions to Make Array Divisible [无] C++
2345 Finding the Number of Visible Mountains [无] C++
2346 Database Problem: Link - - - -
2347 Best Poker Hand [无] C++
2348 Number of Zero-Filled Subarrays [无] C++
2349 Design a Number Container System [无] C++
2350 Shortest Impossible Sequence of Rolls [无] C++
2351 First Letter to Appear Twice [无] C++
2352 Equal Row and Column Pairs [无] C++
2353 Design a Food Rating System [无] C++
2354 Number of Excellent Pairs [无] C++
2356 Database Problem: Link - - - -
2357 Make Array Zero by Subtracting Equal Amounts [无] C++
2358 Maximum Number of Groups Entering a Competition [无] C++
2359 Find Closest Node to Given Two Nodes [无] C++
2360 Longest Cycle in a Graph [无] C++
2361 Minimum Costs Using the Train Line [无] C++
2362 Database Problem: Link - - - -
2363 Merge Similar Items [无] C++
2364 Count Number of Bad Pairs [无] C++
2365 Task Scheduler II [无] C++
2366 Minimum Replacements to Sort the Array [无] C++
2367 Number of Arithmetic Triplets [无] C++
2368 Reachable Nodes With Restrictions [无] C++
2369 Check if There is a Valid Partition For The Array [无] C++
2370 Longest Ideal Subsequence [无] C++
2372 Database Problem: Link - - - -
2373 Largest Local Values in a Matrix [无] C++
2374 Node With Highest Edge Score [无] C++
2375 Construct Smallest Number From DI String [无] C++
2376 Count Special Integers [无] C++
2377 Database Problem: Link - - - -
2378 Choose Edges to Maximize Score in a Tree [无] C++
2379 Minimum Recolors to Get K Consecutive Black Blocks [无] C++
2380 Time Needed to Rearrange a Binary String [无] C++
2381 Shifting Letters II [无] C++
2382 Maximum Segment Sum After Removals [无] C++
2383 Minimum Hours of Training to Win a Competition [无] C++
2384 Largest Palindromic Number [无] C++
2385 Amount of Time for Binary Tree to Be Infected [无] C++
2387 Median of a Row Wise Sorted Matrix [无] C++
2388 Database Problem: Link - - - -
2389 Longest Subsequence With Limited Sum [无] C++
2390 Removing Stars From a String [无] C++
2391 Minimum Amount of Time to Collect Garbage [无] C++
2392 Build a Matrix With Conditions [无] C++
2393 Count Strictly Increasing Subarrays [无] C++
2394 Database Problem: Link - - - -
2395 Find Subarrays With Equal Sum [无] C++
2396 Strictly Palindromic Number [无] C++
2397 Maximum Rows Covered by Columns [无] C++
2398 Maximum Number of Robots Within Budget [无][缺:滑动窗口] C++
2399 Check Distances Between Same Letters [无] C++
2400 Number of Ways to Reach a Position After Exactly k Steps [无][缺:数学解] C++
2401 Longest Nice Subarray [无] C++
2402 Meeting Rooms III [无] C++
2403 Minimum Time to Kill All Monsters [无] C++
2404 Most Frequent Even Element [无] C++
2405 Optimal Partition of String [无] C++
2406 Divide Intervals Into Minimum Number of Groups [无] C++
2407 Longest Increasing Subsequence II [无] C++
2408 Design SQL [无] C++
2409 Count Days Spent Together [无] C++
2410 Maximum Matching of Players With Trainers [无] C++
2411 Smallest Subarrays With Maximum Bitwise OR [无][缺:O(n) 算法] C++
2412 Minimum Money Required Before Transactions [无] [缺:不用 sort] C++
2413 Smallest Even Multiple [无] C++
2414 Length of the Longest Alphabetical Continuous Substring [无] C++
2415 Reverse Odd Levels of Binary Tree [无] C++
2416 Sum of Prefix Scores of Strings [无] C++
2417 Closest Fair Integer [无] C++
2418 Sort the People [无] C++
2419 Longest Subarray With Maximum Bitwise AND [无] C++
2420 Find All Good Indices [无] C++
2421 Number of Good Paths [无] C++
2422 Merge Operations to Turn Array Into a Palindrome [无] C++
2423 Remove Letter To Equalize Frequency [无] C++
2424 Longest Uploaded Prefix [无] C++
2425 Bitwise XOR of All Pairings [无] C++
2426 Number of Pairs Satisfying Inequality [无]
[缺:493 问题整理]
C++
2427 Number of Common Factors [无] C++
2428 Maximum Sum of an Hourglass [无] C++
2429 Minimize XOR [无] C++
2430 Maximum Deletions on a String [无] C++
2431 Maximize Total Tastiness of Purchased Fruits [无] C++
2432 The Employee That Worked on the Longest Task [无] C++
2433 Find The Original Array of Prefix Xor [无] C++
2434 Using a Robot to Print the Lexicographically Smallest String [无] C++
2435 Paths in Matrix Whose Sum Is Divisible by K [无] C++
2436 Minimum Split Into Subarrays With GCD Greater Than One [无] C++
2437 Number of Valid Clock Times [无] C++
2438 Range Product Queries of Powers [无] C++
2439 Minimize Maximum of Array [无] C++
2440 Create Components With Same Value [无] C++
2441 Largest Positive Integer That Exists With Its Negative [无] C++
2442 Count Number of Distinct Integers After Reverse Operations [无] C++
2443 Sum of Number and Its Reverse [无] C++
2444 Count Subarrays With Fixed Bounds [无] C++
2445 Number of Nodes With Value One [无] C++
2446 Determine if Two Events Have Conflict [无] C++
2447 Number of Subarrays With GCD Equal to K [无] C++
2448 Minimum Cost to Make Array Equal [无] C++
2449 Minimum Number of Operations to Make Arrays Similar [无] C++
2450 Number of Distinct Binary Strings After Applying Operations [无] C++
2451 Odd String Difference [无] C++
2452 Words Within Two Edits of Dictionary [无] C++
2453 Destroy Sequential Targets [无] C++
2454 Next Greater Element IV [无]
[缺:O(n) 解法]
C++
2455 Average Value of Even Numbers That Are Divisible by Three [无] C++
2456 Most Popular Video Creator [无] C++
2457 Minimum Addition to Make Integer Beautiful [无] C++
2458 Height of Binary Tree After Subtree Removal Queries [无] C++
2459 Sort Array by Moving Items to Empty Space [无] C++
2460 Apply Operations to an Array [无] C++
2461 Maximum Sum of Distinct Subarrays With Length K [无] C++
2462 Total Cost to Hire K Workers [无] C++
2463 Minimum Total Distance Traveled [无] C++
2464 Minimum Subarrays in a Valid Split [无] C++
2465 Number of Distinct Averages [无] C++
2466 Count Ways To Build Good Strings [无] C++
2467 Most Profitable Path in a Tree [无] C++
2468 Split Message Based on Limit [无] C++
2469 Convert the Temperature [无] C++
2470 Number of Subarrays With LCM Equal to K [无] C++
2471 Minimum Number of Operations to Sort a Binary Tree by Level [无] C++
2472 Maximum Number of Non-overlapping Palindrome Substrings [无] C++
2473 Minimum Cost to Buy Apples [无] C++
2474 Database Problem: Link - - - -
2475 Number of Unequal Triplets in Array [无] C++
2476 Closest Nodes Queries in a Binary Search Tree [无] C++
2477 Minimum Fuel Cost to Report to the Capital [无] C++
2478 Number of Beautiful Partitions [无] C++
2479 Maximum XOR of Two Non-Overlapping Subtrees [无] C++
2480 Database Problem: Link - - - -
2481 Minimum Cuts to Divide a Circle [无] C++
2482 Difference Between Ones and Zeros in Row and Column [无] C++
2483 Minimum Penalty for a Shop [无] C++
2484 Count Palindromic Subsequences [无] C++
2485 Find the Pivot Integer [无] C++
2486 Append Characters to String to Make Subsequence [无] C++
2487 Remove Nodes From Linked List [无] C++
2488 Count Subarrays With Median K [无] C++
2489 Number of Substrings With Fixed Ratio [无] C++
2490 Circular Sentence [无] C++
2491 Divide Players Into Teams of Equal Skill [无] C++
2492 Minimum Score of a Path Between Two Cities [无] C++
2493 Divide Nodes Into the Maximum Number of Groups [无] C++
2494 Database Problem: Link - - - -
2495 Number of Subarrays Having Even Product [无] C++
2496 Maximum Value of a String in an Array [无] C++
2497 Maximum Star Sum of a Graph [无] C++
2498 Frog Jump II [无] C++
2499 Minimum Total Cost to Make Arrays Unequal [无] C++
2500 Delete Greatest Value in Each Row [无] C++
2501 Longest Square Streak in an Array [无] C++
2502 Design Memory Allocator [无] C++
2503 Maximum Number of Points From Grid Queries [无] C++
2504 Database Problem: Link - - - -
2505 Bitwise OR of All Subsequence Sums [无] C++
2506 Count Pairs Of Similar Strings [无] C++
2507 Smallest Value After Replacing With Sum of Prime Factors [无] C++
2508 Add Edges to Make Degrees of All Nodes Even [无] C++
2509 Cycle Length Queries in a Tree [无] C++
2510 Check if There is a Path With Equal Number of 0's And 1's [无] C++
2511 Maximum Enemy Forts That Can Be Captured [无] C++
2512 Reward Top K Students [无] C++
2513 Minimize the Maximum of Two Arrays [无] C++
2514 Count Anagrams [无] C++
2515 Shortest Distance to Target String in a Circular Array [无] C++
2516 Take K of Each Character From Left and Right [无] C++
2517 Maximum Tastiness of Candy Basket [无] C++
2518 Number of Great Partitions [无] C++
2519 Count the Number of K-Big Indices [无] C++
2520 Count the Digits That Divide a Number [无] C++
2521 Distinct Prime Factors of Product of Array [无] C++
2522 Partition String Into Substrings With Values at Most K [无] C++
2523 Closest Prime Numbers in Range [无] C++
2524 Maximum Frequency Score of a Subarray [无] C++
2525 Categorize Box According to Criteria [无] C++
2526 Find Consecutive Integers from a Data Stream [无] C++
2527 Find Xor-Beauty of Array [无] C++
2528 Maximize the Minimum Powered City [无] C++
2529 Maximum Count of Positive Integer and Negative Integer [无] C++
2530 Maximal Score After Applying K Operations [无] C++
2531 Make Number of Distinct Characters Equal [无] C++
2532 Time to Cross a Bridge [无] C++
2533 Number of Good Binary Strings [无] C++
2534 Time Taken to Cross the Door [无] C++
2535 Difference Between Element Sum and Digit Sum of an Array [无] C++
2536 Increment Submatrices by One [无] C++
2537 Count the Number of Good Subarrays [无] C++
2539 Count the Number of Good Subsequences [无] C++
2540 Minimum Common Value [无] C++
2541 Minimum Operations to Make Array Equal II [无] C++
2542 Maximum Subsequence Score [无] C++
2543 Check if Point Is Reachable [无] C++
2544 Alternating Digit Sum [无] C++
2545 Sort the Students by Their Kth Score [无] C++
2546 Apply Bitwise Operations to Make Strings Equal [无] C++
2547 Minimum Cost to Split an Array [无] C++
2548 Maximum Price to Fill a Bag [无] C++
2549 Count Distinct Numbers on Board [无] C++
2550 Count Collisions of Monkeys on a Polygon [无] C++
2551 Put Marbles in Bags [无] C++
2553 Separate the Digits in an Array [无] C++
2554 Maximum Number of Integers to Choose From a Range I [无] C++
2555 Maximize Win From Two Segments [无] C++
2556 Disconnect Path in a Binary Matrix by at Most One Flip [无] C++
2557 Maximum Number of Integers to Choose From a Range II [无] C++
2558 Take Gifts From the Richest Pile [无] C++
2559 Count Vowel Strings in Ranges [无] C++
2560 House Robber IV [无] C++
2561 Rearranging Fruits [无] C++
2562 Find the Array Concatenation Value [无] C++
2563 Count the Number of Fair Pairs [无] C++
2564 Substring XOR Queries [无] C++
2565 Subsequence With the Minimum Score [无] C++
2566 Maximum Difference by Remapping a Digit [无] C++
2567 Minimum Score by Changing Two Elements [无] C++
2568 Minimum Impossible OR [无] C++
2569 Handling Sum Queries After Update [无] C++
2570 Merge Two 2D Arrays by Summing Values [无] C++
2571 Minimum Operations to Reduce an Integer to 0 [无] C++
2572 Count the Number of Square-Free Subsets [无] C++
2573 Find the String with LCP [无] C++
2574 Left and Right Sum Differences [无] C++
2575 Find the Divisibility Array of a String [无] C++
2576 Find the Maximum Number of Marked Indices [无] C++
2577 Minimum Time to Visit a Cell In a Grid [无] C++
2578 Split With Minimum Sum [无] C++
2579 Count Total Number of Colored Cells [无] C++
2580 Count Ways to Group Overlapping Ranges [无] C++
2581 Count Number of Possible Root Nodes [无] C++
2582 Pass the Pillow [无] C++
2583 Kth Largest Sum in a Binary Tree [无] C++
2584 Split the Array to Make Coprime Products [无] C++
2585 Number of Ways to Earn Points [无] C++
2586 Count the Number of Vowel Strings in Range [无] C++
2587 Rearrange Array to Maximize Prefix Score [无] C++
2588 Count the Number of Beautiful Subarrays [无] C++
2589 Minimum Time to Complete All Tasks [无] C++
2590 Design a Todo List [无] C++
2591 Distribute Money to Maximum Children [无] C++
2592 Maximize Greatness of an Array [无] C++
2593 Find Score of an Array After Marking All Elements [无] C++
2594 Minimum Time to Repair Cars [无] C++
2595 Number of Even and Odd Bits [无] C++
2596 Check Knight Tour Configuration [无] C++
2597 The Number of Beautiful Subsets [无] C++
2598 Smallest Missing Non-negative Integer After Operations [无] C++
2599 Make the Prefix Sum Non-negative [无] C++
2600 K Items With the Maximum Sum [无] C++
2601 Prime Subtraction Operation [无] C++
2602 Minimum Operations to Make All Array Elements Equal [无] C++
2603 Collect Coins in a Tree [无] C++
2604 Minimum Time to Eat All Grains [无] C++
2605 Form Smallest Number From Two Digit Arrays [无] C++
2606 Find the Substring With Maximum Cost [无] C++
2607 Make K-Subarray Sums Equal [无] C++
2608 Shortest Cycle in a Graph [无] C++
2609 Find the Longest Balanced Substring of a Binary String [无] C++
2610 Convert an Array Into a 2D Array With Conditions [无] C++
2611 Mice and Cheese [无] C++
2612 Minimum Reverse Operations [无] C++
2614 Prime In Diagonal [无] C++
2615 Sum of Distances [无] C++
2616 Minimize the Maximum Difference of Pairs [无] C++
2617 Minimum Number of Visited Cells in a Grid [无] C++
2618 JavaScript Problem - - - -
2619 JavaScript Problem - - - -
2620 JavaScript Problem - - - -
2621 JavaScript Problem - - - -
2622 JavaScript Problem - - - -
2623 JavaScript Problem - - - -
2624 JavaScript Problem - - - -
2625 JavaScript Problem - - - -
2626 JavaScript Problem - - - -
2627 JavaScript Problem - - - -
2628 JavaScript Problem - - - -
2629 JavaScript Problem - - - -
2630 JavaScript Problem - - - -
2631 JavaScript Problem - - - -
2632 JavaScript Problem - - - -
2633 JavaScript Problem - - - -
2634 JavaScript Problem - - - -
2635 JavaScript Problem - - - -
2636 JavaScript Problem - - - -
2637 JavaScript Problem - - - -
2638 Count the Number of K-Free Subsets [无] C++
2639 Find the Width of Columns of a Grid [无] C++
2640 Find the Score of All Prefixes of an Array [无] C++
2641 Cousins in Binary Tree II [无] C++
2642 Design Graph With Shortest Path Calculator [无] C++
2643 Row With Maximum Ones [无] C++
2644 Find the Maximum Divisibility Score [无] C++
2645 Minimum Additions to Make Valid String [无] C++
2646 Minimize the Total Price of the Trips [无] C++
2647 Color the Triangle Red [无] C++
2648 JavaScript Problem - - - -
2649 JavaScript Problem - - - -
2650 JavaScript Problem - - - -
2651 Calculate Delayed Arrival Time [无] C++
2652 Sum Multiples [无] C++
2653 Sliding Subarray Beauty [无] C++
2654 Minimum Number of Operations to Make All Array Elements Equal to 1 [无] C++
2655 Find Maximal Uncovered Ranges [无] C++
2656 Maximum Sum With Exactly K Elements [无] C++
2657 Find the Prefix Common Array of Two Arrays [无] C++
2658 Maximum Number of Fish in a Grid [无] C++
2659 Make Array Empty [无] C++
2660 Determine the Winner of a Bowling Game [无] C++
2661 First Completely Painted Row or Column [无] C++
2662 Minimum Cost of a Path With Special Roads [无] C++
2663 Lexicographically Smallest Beautiful String [无] C++
2664 The Knight’s Tour [无] C++
2665 JavaScript Problem - - - -
2666 JavaScript Problem - - - -
2667 JavaScript Problem - - - -
2668 Database Problem: Link - - - -
2669 Database Problem: Link - - - -
2670 Find the Distinct Difference Array [无] C++
2671 Frequency Tracker [无] C++
2672 Number of Adjacent Elements With the Same Color [无] C++
2673 Make Costs of Paths Equal in a Binary Tree [无] C++
2674 Split a Circular Linked List [无] C++
2675 JavaScript Problem - - - -
2676 JavaScript Problem - - - -
2677 JavaScript Problem - - - -
2678 Number of Senior Citizens [无] C++
2679 Sum in a Matrix [无] C++
2680 Maximum OR [无] C++
2681 Power of Heroes [无] C++
2682 Find the Losers of the Circular Game [无] C++
2683 Neighboring Bitwise XOR [无] C++
2684 Maximum Number of Moves in a Grid [无] C++
2685 Count the Number of Complete Components [无] C++
2686 Database Problem: Link - - - -
2687 Database Problem: Link - - - -
2688 Database Problem: Link - - - -
2689 Extract Kth Character From The Rope Tree [无] C++
2690 JavaScript Problem - - - -
2691 JavaScript Problem - - - -
2692 JavaScript Problem - - - -
2693 JavaScript Problem - - - -
2694 JavaScript Problem - - - -
2695 JavaScript Problem - - - -
2696 Minimum String Length After Removing Substrings [无] C++
2697 Lexicographically Smallest Palindrome [无] C++
2698 Find the Punishment Number of an Integer [无] C++
2699 Modify Graph Edge Weights [无] C++
2700 JavaScript Problem - - - -
2701 Database Problem: Link - - - -
2702 Minimum Operations to Make Numbers Non-positive [无] C++
2703 JavaScript Problem - - - -
2704 JavaScript Problem - - - -
2705 JavaScript Problem - - - -
2706 Buy Two Chocolates [无] C++
2707 Extra Characters in a String [无] C++
2708 Maximum Strength of a Group [无] C++
2709 Greatest Common Divisor Traversal [无] C++
2710 Remove Trailing Zeros From a String [无] C++
2711 Difference of Number of Distinct Values on Diagonals [无] C++
2712 Minimum Cost to Make All Characters Equal [无] C++
2713 Maximum Strictly Increasing Cells in a Matrix [无] C++
2714 Find Shortest Path with K Hops [无] C++
2715 JavaScript Problem - - - -
2716 Minimize String Length [无] C++
2717 Semi-Ordered Permutation [无] C++
2718 Sum of Matrix After Queries [无] C++
2719 Count of Integers [无] C++
2720 Database Problem: Link - - - -
2721 JavaScript Problem - - - -
2722 JavaScript Problem - - - -
2723 JavaScript Problem - - - -
2724 JavaScript Problem - - - -
2725 JavaScript Problem - - - -
2726 JavaScript Problem - - - -
2727 JavaScript Problem - - - -
2728 Count Houses in a Circular Street [无] C++
2729 Check if The Number is Fascinating [无] C++
2730 Find the Longest Semi-Repetitive Substring [无] C++
2731 Movement of Robots [无] C++
2732 Find a Good Subset of the Matrix [无] C++
2733 Neither Minimum nor Maximum [无] C++
2734 Lexicographically Smallest String After Substring Operation [无] C++
2735 Collecting Chocolates [无] C++
2736 Maximum Sum Queries [无] C++
2737 Find the Closest Marked Node [无] C++
2738 Database Problem: Link - - - -
2739 Total Distance Traveled [无] C++
2740 Find the Value of the Partition [无] C++
2741 Special Permutations [无] C++
2742 Painting the Walls [无] C++
2743 Count Substrings Without Repeating Character [无] C++
2744 Find Maximum Number of String Pairs [无] C++
2745 Construct the Longest New String [无] C++
2746 Decremental String Concatenation [无] C++
2747 Count Zero Request Servers [无] C++
2748 Number of Beautiful Pairs [无] C++
2749 Minimum Operations to Make the Integer Zero [无] C++
2750 Ways to Split Array Into Good Subarrays [无] C++
2751 Robot Collisions [无] C++
2752 Database Problem: Link - - - -
2754 JavaScript Problem - - - -
2755 JavaScript Problem - - - -
2756 JavaScript Problem - - - -
2757 JavaScript Problem - - - -
2758 JavaScript Problem - - - -
2759 JavaScript Problem - - - -
2760 Longest Even Odd Subarray With Threshold [无] C++
2761 Prime Pairs With Target Sum [无] C++
2762 Continuous Subarrays [无] C++
2763 Sum of Imbalance Numbers of All Subarrays [无] C++
2849 Determine if a Cell Is Reachable at a Given Time [无] C++

力扣中文站比赛 传送门

力扣中文站其他比赛 传送门

play-leetcode's People

Contributors

kyleqiao1992 avatar liuyubobobo avatar marekzhang avatar penpenps avatar ridiculousjoe avatar schofi avatar sevaspb avatar xiaop1ng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

play-leetcode's Issues

波波老师好,有关第209题,求满足条件的子数组长度

209子数组的问题,
while循环中第一个条件 if(r + 1 < nums.size() && sum < s)中的r + 1 < nums.size()
1.要是换成 r < nums.size() -1 答案就不对了,为什么呢? 想不明白,请老师帮忙
2.还有为啥r从-1开始
谢谢老师~

class Solution {
public:
    int minSubArrayLen(int s, vector<int>& nums) {

        assert(s > 0);

        int l = 0 , r = -1; // sliding window: nums[l...r]
        int sum = 0;
        int res = nums.size() + 1;

        while(l < nums.size()){

            if(r + 1 < nums.size() && sum < s)//问题在这里
                sum += nums[++r];
            else
                sum -= nums[l++];

            if(sum >= s)
                res = min(res, r - l + 1);
        }

        return res == nums.size() + 1 ? 0 : res;
    }
};

leetcode5号题

bobo老师有时间提交一下leetcode5号题求最长回文子串的解法吧!!!

LeetCode 的 222. Count Complete Tree Nodes 疑问

Hi, 刘老师.
在github上看到你的各种算法代码, 激动地流下了口水, 哈哈.
今天在用 java 刷LeetCode 的 222. Count Complete Tree Nodes 遇上了一个疑问, 想请教你一下.

  1. 这道求完全二叉树的节点个数问题, 最常规的方式就是递归, 方法一如下:
class Solution {
  public int countNodes(TreeNode root) {
    if(root != null) {
      return 1 + countNodes(root.left) + countNodes(root.right);
    } else {
      return 0;
    }
  }
}

但这个方法在大数据量的情况下会超时, 时间应该超过了 1s.

  1. 根据完全二叉树的规律, 寻找最后一个叶子节点的方法二:
class Solution {
  public int countNodes(TreeNode root) {
    int nodes = 0, h = height(root);
    while(root != null) {
      if(height(root.right) + 1 == h) {
        // 右子树高度 = 左子树高度, 最后个叶节点在右子树
        // 加上左子树的所有节点, 往右子树走
        nodes += 1 << h;
        root = root.right;
      } else { // height(root.right) + 2 == h
        // 右子树高度 = 左子树高度 - 1, 最后个叶节点在左子树
        // 加上右子树的所有节点, 往左子树走
        nodes += 1 << (h - 1);
        root = root.left;
      }
      h--;
    }
    return nodes;
  }

  // 完全二叉树, 高度只看左子树
  // 返回的高度比实际高度小1, 为了方便计算满二叉树的节点个数
  public int height(TreeNode root) {
    return root == null ? -1 : 1 + height(root.left);
  }
}

这个方法效率高了许多, 耗时 81ms, Discuss 中基本都是讨论的这种方法.

  1. 但是! 当我提交方法二后, 发现排名并不靠前, 下面的类似方法三的却是都类似如下代码:
class Solution {
  public int countNodes(TreeNode root) {
    if(root == null) return 0;
    if (root.val != Integer.MIN_VALUE) {
      root.val = Integer.MIN_VALUE;
      return 1 + countNodes(root.left) + countNodes(root.right);
    } else {
      return 0;
    }
  }
}

这就是在常规方法一的基础上, inplace的改变了每个节点的值, 增加判断条件. 我思考了下, 认为函数递归调用栈与方法一没有区别, 为什么时间却缩短到了 12ms ?

我的问题是: 方式三中增加了原地赋值和判断, 性能为什么提高了如此之多?

感谢刘老师!

LeetCode:937. Reorder Log Files 问题的第二中解法无法AC,修正后代码见正文,请您指正

您好,正如标题中所示,该题第二种利用lambda表达式的解法无法AC。
测试样例如下:

["l5sh 6 3869 08 1295", "16o 94884717383724 9", "43 490972281212 3 51", "9 ehyjki ngcoobi mi", "2epy 85881033085988", "7z fqkbxxqfks f y dg", "9h4p 5 791738 954209", "p i hz uubk id s m l", "wd lfqgmu pvklkdp u", "m4jl 225084707500464", "6np2 bqrrqt q vtap h", "e mpgfn bfkylg zewmg", "ttzoz 035658365825 9", "k5pkn 88312912782538", "ry9 8231674347096 00", "w 831 74626 07 353 9", "bxao armngjllmvqwn q", "0uoj 9 8896814034171", "0 81650258784962331", "t3df gjjn nxbrryos b"]

我根据您的代码修正后AC的代码,请您指正:

class Solution {
public:
    vector<string> reorderLogFiles(vector<string>& logs) {
        sort(logs.begin(), logs.end(), [logs](const string &log1, const string &log2) -> bool {
             int space1 = log1.find(' ');
             string id1 = log1.substr(0, space1);
             string after1 = log1.substr(space1+1);

             int space2 = log2.find(' ');
             string id2 = log2.substr(0, space2);
             string after2 = log2.substr(space2+1);

             if (isalpha(after1[0]) != isalpha(after2[0])) {
                return isalpha(after1[0]);
             }

             if (isalpha(after1[0]))
                return after1 == after2 ? id1 < id2 : after1 < after2;
             return find(logs.begin(), logs.end(), log1) < find(logs.begin(), logs.end(), log2); 
        });
        return logs;
    }
};

K-th Symbol in Grammar C++ solution

`//K-th-Symbol-in-Grammar-C++ -solution
//Author : Amish Bharti
//NIT Durgapur

#include<bits/stdc++.h>

class Solution {
public:
int kthGrammar(int N, int K) {

    int count = __builtin_popcount(K-1);
      return count & 1;
}

};
`

209题优化的暴力解法

public int minSubArrayLen2(int s, int[] nums) {

	int res = nums.length+1;

	for (int i = 0 ; i<nums.length ; i++){
	    int sum = 0;
	    for (int j = i ; j<nums.length; j++){
		sum+=nums[j];
		if (sum>=s){
		    res = Math.min(res,j-i+1);
		    break;
		}
	    }
	}
	if (res!=nums.length+1){
	    return res;
	}else {
	    return 0;
	}
    }

这样就不需要额外的空间了!

0289-Game-of-Life,R + 1, 和 C + 1 存在数组越界问题。

bobo老师好。leetcode 第 289 题。

        R = board.size(), C = board[0].size();
        vector<vector<int>> res(R, vector<int>(C, 0));

        for(int i = 0; i < R; i ++)
            for(int j = 0; j < C; j ++){

                int num = 0;
                for(int ii = max(0, i - 1); ii <= min(i + 1, R + 1); ii ++)
                    for(int jj = max(0, j - 1); jj <= min(j + 1, C + 1); jj ++){
                        if(ii == i && jj == j) continue;
                        num += board[ii][jj];
                    }

                if(board[i][j]){
                    if(num < 2 || num > 3) res[i][j] = 0;
                    else res[i][j] = 1;
                }
                else{
                    if(num == 3) res[i][j] = 1;
                }
            }

        board = res;

假设是一个 4 x 3 的数组,min(j + 1, C + 1) 会导致 jj 的取值可以为 3,而,数组的列数取值只能小于等于2,这样就会导致数组越界。
应该将 R + 1 改为 R - 1,C + 1 改为 C -1。

波波老师你好,1171题代码有点问题

老师你这道题思路很好,但是对于[1,3,2,-3,-2,5,5,-5,1]这个测试用例,算前缀和,算到2的时候,出现了一次6,然后到5的时候又出现了一次6,但是实际上我们已经把从3- -2这部分删除掉了,所以每次删除中间部分元素的时候,也需要把计算中间部分的map中保存的对应内容也给删掉才可以~

使用long long num = abs(x) 不能解决溢出问题

对于main.cpp中的代码,当测试用例是-2147483648仍然会报溢出错误。
Line 8: Char 28: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself (solution.cpp)
改成下面的代码就OK了
long long num = abs((long long)x);

老师您好,求助LeetCode面试题57题 - II. 和为s的连续正数序列

https://leetcode-cn.com/problems/he-wei-sde-lian-xu-zheng-shu-xu-lie-lcof/

输入一个正整数 target ,输出所有和为 target 的连续正整数序列(至少含有两个数)。
序列内的数字由小到大排列,不同序列按照首个数字从小到大排列
没有找到这个问题的代码,
我的解决方案是:

class Solution {
public:
    vector<vector<int>> findContinuousSequence(int target) {
        int i,j = 0;
        vector<int> vec;
        vec.push_back(1);
        int sum = 0;
        vector<vector<int>> res;

        while(vec[j] <= target){
            if(sum < target){
                sum += vec[j];
                j++;
                vec.push_back(j+1);
            }
            else if(sum > target){
                sum -= vec[i];
                i++;
            }
            else{
                res.push_back(vector<int>(vec.begin()+i, vec.begin()+j));
                sum -= vec[i];
                i++;
            }
        }
        return res;

    }
};

有时会提示 terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
有时是AddressSanitizer:DEADLYSIGNAL
有时使用测试用例又能出现正确解答,
所以我一时找不出无法通过的原因,希望您予以指点改进方法,感激不尽。

46题java的solution2解法是错的

在回溯法中如果使用交换2个元素的思路,以下方法是对的:

class Solution {
    List<List<Integer>> ret = new ArrayList<List<Integer>>();
    public List<List<Integer>> permute(int[] nums) {
        if(nums==null || nums.length==0) return ret;

        search(nums, 0);
        return ret;
    }
    private void search(int[] nums, int index) {
        if(index == nums.length) {
            List<Integer> list = new ArrayList<Integer>();
            for(int i : nums){
                list.add(i);
            }
            ret.add(list);
        }
        for(int i=index;i<nums.length;i++) {
            swap(nums, i, index);
            search(nums, index+1);
            swap(nums, i, index);
        }
    }
    private void swap(int[] nums, int i, int j) {
        if(i == j) return;

        int t = nums[i];
        nums[i] = nums[j];
        nums[j] = t;
    }
}

0001-Two-Sum第一种解决方案的边界处理存在Bug

比如测试改成:[0, 4, 3, 5],此时target=10,返回的结果是[3,3]。题目中要求是:不能重复利用这个数组中同样的元素,所以需要把外层循环的判断调整为:nums.length-1。

当然,根据题目中给出的假设:假设每种输入只会对应一个答案,所以不会有我们这样的case,所以处不处理都可以通过测试。

64号题,cpp, main2的解法

res[1][0] = grid[0][0] + res[0][0];
这条代码是不是有问题呀?应该是res[1][0] = grid[1][0] + res[0][0]
当然直接改的话会出错,因为grid[1][0]可能会发生越界
在下面的for循环中,res[i%2][0] = grid[i][0] + res[(i-1)%2][0];这条代码已经计算了res[1][0]
综上所述, res[1][0] = grid[0][0] + res[0][0]; 这条代码时错误而且多余的

377题,main2.cpp出现signed integer overflow

波波老师,第377题,当测试用例是[3,33,333] 10000时,用递归的方法可以通过,但是当用动态规划的方法main2.cpp时,会出现signed integer overflow的错误,将vector memo改成vector memo也仍然会出现这个错误

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.