Skip to content

Medium 题目清单

本清单由 scripts/generate_difficulty_readmes.py 根据 dataset/merged_problems.json 生成。

题目数量:1464

编号 题目 分类
0002 Add Two Numbers Linked List, Math, Recursion
0003 Longest Substring Without Repeating Characters Hash Table, String, Sliding Window
0005 Longest Palindromic Substring Two Pointers, String, Dynamic Programming
0006 Zigzag Conversion String
0007 Reverse Integer Math
0008 String to Integer (atoi) String
0011 Container With Most Water Array, Two Pointers, Greedy
0012 Integer to Roman Hash Table, Math, String
0015 3Sum Array, Two Pointers, Sorting
0016 3Sum Closest Array, Two Pointers, Sorting
0017 Letter Combinations of a Phone Number Hash Table, String, Backtracking
0018 4Sum Array, Two Pointers, Sorting
0019 Remove Nth Node From End of List Linked List, Two Pointers
0022 Generate Parentheses String, Dynamic Programming, Backtracking
0024 Swap Nodes in Pairs Linked List, Recursion
0029 Divide Two Integers Math, Bit Manipulation
0031 Next Permutation Array, Two Pointers
0033 Search in Rotated Sorted Array Array, Binary Search
0034 Find First and Last Position of Element in Sorted Array Array, Binary Search
0036 Valid Sudoku Array, Hash Table, Matrix
0038 Count and Say String
0039 Combination Sum Array, Backtracking
0040 Combination Sum II Array, Backtracking
0043 Multiply Strings Math, String, Simulation
0045 Jump Game II Array, Dynamic Programming, Greedy
0046 Permutations Array, Backtracking
0047 Permutations II Array, Backtracking, Sorting
0048 Rotate Image Array, Math, Matrix
0049 Group Anagrams Array, Hash Table, String, Sorting
0050 Pow(x, n) Math, Recursion
0053 Maximum Subarray Array, Divide and Conquer, Dynamic Programming
0054 Spiral Matrix Array, Matrix, Simulation
0055 Jump Game Array, Dynamic Programming, Greedy
0056 Merge Intervals Array, Sorting
0057 Insert Interval Array
0059 Spiral Matrix II Array, Matrix, Simulation
0061 Rotate List Linked List, Two Pointers
0062 Unique Paths Math, Dynamic Programming, Combinatorics
0063 Unique Paths II Array, Dynamic Programming, Matrix
0064 Minimum Path Sum Array, Dynamic Programming, Matrix
0071 Simplify Path String, Stack
0072 Edit Distance String, Dynamic Programming
0073 Set Matrix Zeroes Array, Hash Table, Matrix
0074 Search a 2D Matrix Array, Binary Search, Matrix
0075 Sort Colors Array, Two Pointers, Sorting
0077 Combinations Backtracking
0078 Subsets Array, Backtracking, Bit Manipulation
0079 Word Search Array, String, Backtracking, Depth-First Search, Matrix
0080 Remove Duplicates from Sorted Array II Array, Two Pointers
0081 Search in Rotated Sorted Array II Array, Binary Search
0082 Remove Duplicates from Sorted List II Linked List, Two Pointers
0086 Partition List Linked List, Two Pointers
0089 Gray Code Math, Backtracking, Bit Manipulation
0090 Subsets II Array, Backtracking, Bit Manipulation
0091 Decode Ways String, Dynamic Programming
0092 Reverse Linked List II Linked List
0093 Restore IP Addresses String, Backtracking
0095 Unique Binary Search Trees II Dynamic Programming, Backtracking, Tree, Binary Search Tree, Binary Tree
0096 Unique Binary Search Trees Math, Dynamic Programming, Tree, Binary Search Tree, Binary Tree
0097 Interleaving String String, Dynamic Programming
0098 Validate Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree
0099 Recover Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree
0102 Binary Tree Level Order Traversal Tree, Breadth-First Search, Binary Tree
0103 Binary Tree Zigzag Level Order Traversal Tree, Breadth-First Search, Binary Tree
0105 Construct Binary Tree from Preorder and Inorder Traversal Array, Hash Table, Divide and Conquer, Tree, Binary Tree
0106 Construct Binary Tree from Inorder and Postorder Traversal Array, Hash Table, Divide and Conquer, Tree, Binary Tree
0107 Binary Tree Level Order Traversal II Tree, Breadth-First Search, Binary Tree
0109 Convert Sorted List to Binary Search Tree Linked List, Divide and Conquer, Tree, Binary Search Tree, Binary Tree
0113 Path Sum II Backtracking, Tree, Depth-First Search, Binary Tree
0114 Flatten Binary Tree to Linked List Linked List, Stack, Tree, Depth-First Search, Binary Tree
0116 Populating Next Right Pointers in Each Node Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree
0117 Populating Next Right Pointers in Each Node II Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree
0120 Triangle Array, Dynamic Programming
0122 Best Time to Buy and Sell Stock II Array, Dynamic Programming, Greedy
0128 Longest Consecutive Sequence Array, Hash Table, Union Find
0129 Sum Root to Leaf Numbers Tree, Depth-First Search, Binary Tree
0130 Surrounded Regions Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
0131 Palindrome Partitioning String, Dynamic Programming, Backtracking
0133 Clone Graph Hash Table, Depth-First Search, Breadth-First Search, Graph
0134 Gas Station Array, Greedy
0137 Single Number II Array, Bit Manipulation
0138 Copy List with Random Pointer Hash Table, Linked List
0139 Word Break Array, Hash Table, String, Dynamic Programming, Trie, Memoization
0142 Linked List Cycle II Hash Table, Linked List, Two Pointers
0143 Reorder List Linked List, Two Pointers, Stack, Recursion
0146 LRU Cache Hash Table, Linked List, Design, Doubly-Linked List
0147 Insertion Sort List Linked List, Sorting
0148 Sort List Linked List, Two Pointers, Divide and Conquer, Sorting, Merge Sort
0150 Evaluate Reverse Polish Notation Array, Math, Stack
0151 Reverse Words in a String Two Pointers, String
0152 Maximum Product Subarray Array, Dynamic Programming
0153 Find Minimum in Rotated Sorted Array Array, Binary Search
0155 Min Stack Stack, Design
0162 Find Peak Element Array, Binary Search
0164 Maximum Gap Array, Sorting, Bucket Sort, Radix Sort
0165 Compare Version Numbers Two Pointers, String
0166 Fraction to Recurring Decimal Hash Table, Math, String
0167 Two Sum II - Input Array Is Sorted Array, Two Pointers, Binary Search
0172 Factorial Trailing Zeroes Math
0173 Binary Search Tree Iterator Stack, Tree, Design, Binary Search Tree, Binary Tree, Iterator
0176 Second Highest Salary Database
0177 Nth Highest Salary Database
0178 Rank Scores Database
0179 Largest Number Array, String, Greedy, Sorting
0180 Consecutive Numbers Database
0184 Department Highest Salary Database
0187 Repeated DNA Sequences Hash Table, String, Bit Manipulation, Sliding Window, Rolling Hash, Hash Function
0189 Rotate Array Array, Math, Two Pointers
0192 Word Frequency Shell
0194 Transpose File Shell
0198 House Robber Array, Dynamic Programming
0199 Binary Tree Right Side View Tree, Depth-First Search, Breadth-First Search, Binary Tree
0200 Number of Islands Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
0201 Bitwise AND of Numbers Range Bit Manipulation
0204 Count Primes Array, Math, Enumeration, Number Theory
0207 Course Schedule Depth-First Search, Breadth-First Search, Graph, Topological Sort
0208 Implement Trie (Prefix Tree) Hash Table, String, Design, Trie
0209 Minimum Size Subarray Sum Array, Binary Search, Sliding Window, Prefix Sum
0210 Course Schedule II Depth-First Search, Breadth-First Search, Graph, Topological Sort
0211 Design Add and Search Words Data Structure String, Depth-First Search, Design, Trie
0213 House Robber II Array, Dynamic Programming
0215 Kth Largest Element in an Array Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
0216 Combination Sum III Array, Backtracking
0221 Maximal Square Array, Dynamic Programming, Matrix
0223 Rectangle Area Math, Geometry
0227 Basic Calculator II Math, String, Stack
0229 Majority Element II Array, Hash Table, Sorting, Counting
0230 Kth Smallest Element in a BST Tree, Depth-First Search, Binary Search Tree, Binary Tree
0235 Lowest Common Ancestor of a Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree
0236 Lowest Common Ancestor of a Binary Tree Tree, Depth-First Search, Binary Tree
0237 Delete Node in a Linked List Linked List
0238 Product of Array Except Self Array, Prefix Sum
0240 Search a 2D Matrix II Array, Binary Search, Divide and Conquer, Matrix
0241 Different Ways to Add Parentheses Math, String, Dynamic Programming, Recursion, Memoization
0260 Single Number III Array, Bit Manipulation
0264 Ugly Number II Hash Table, Math, Dynamic Programming, Heap (Priority Queue)
0274 H-Index Array, Sorting, Counting Sort
0275 H-Index II Array, Binary Search
0279 Perfect Squares Math, Dynamic Programming, Breadth-First Search
0284 Peeking Iterator Array, Design, Iterator
0287 Find the Duplicate Number Array, Two Pointers, Binary Search, Bit Manipulation
0289 Game of Life Array, Matrix, Simulation
0299 Bulls and Cows Hash Table, String, Counting
0300 Longest Increasing Subsequence Array, Binary Search, Dynamic Programming
0304 Range Sum Query 2D - Immutable Array, Design, Matrix, Prefix Sum
0306 Additive Number String, Backtracking
0307 Range Sum Query - Mutable Array, Design, Binary Indexed Tree, Segment Tree
0309 Best Time to Buy and Sell Stock with Cooldown Array, Dynamic Programming
0310 Minimum Height Trees Depth-First Search, Breadth-First Search, Graph, Topological Sort
0313 Super Ugly Number Array, Math, Dynamic Programming
0316 Remove Duplicate Letters String, Stack, Greedy, Monotonic Stack
0318 Maximum Product of Word Lengths Array, String, Bit Manipulation
0319 Bulb Switcher Math, Brainteaser
0322 Coin Change Array, Dynamic Programming, Breadth-First Search
0324 Wiggle Sort II Array, Divide and Conquer, Greedy, Sorting, Quickselect
0328 Odd Even Linked List Linked List
0331 Verify Preorder Serialization of a Binary Tree String, Stack, Tree, Binary Tree
0334 Increasing Triplet Subsequence Array, Greedy
0337 House Robber III Dynamic Programming, Tree, Depth-First Search, Binary Tree
0341 Flatten Nested List Iterator Stack, Tree, Depth-First Search, Design, Queue, Iterator
0343 Integer Break Math, Dynamic Programming
0347 Top K Frequent Elements Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect
0355 Design Twitter Hash Table, Linked List, Design, Heap (Priority Queue)
0357 Count Numbers with Unique Digits Math, Dynamic Programming, Backtracking
0365 Water and Jug Problem Math, Depth-First Search, Breadth-First Search
0368 Largest Divisible Subset Array, Math, Dynamic Programming, Sorting
0371 Sum of Two Integers Math, Bit Manipulation
0372 Super Pow Math, Divide and Conquer
0373 Find K Pairs with Smallest Sums Array, Heap (Priority Queue)
0375 Guess Number Higher or Lower II Math, Dynamic Programming, Game Theory
0376 Wiggle Subsequence Array, Dynamic Programming, Greedy
0377 Combination Sum IV Array, Dynamic Programming
0378 Kth Smallest Element in a Sorted Matrix Array, Binary Search, Sorting, Heap (Priority Queue), Matrix
0380 Insert Delete GetRandom O(1) Array, Hash Table, Math, Design, Randomized
0382 Linked List Random Node Linked List, Math, Reservoir Sampling, Randomized
0384 Shuffle an Array Array, Math, Design, Randomized
0385 Mini Parser String, Stack, Depth-First Search
0386 Lexicographical Numbers Depth-First Search, Trie
0388 Longest Absolute File Path String, Stack, Depth-First Search
0390 Elimination Game Math, Recursion
0393 UTF-8 Validation Array, Bit Manipulation
0394 Decode String String, Stack, Recursion
0395 Longest Substring with At Least K Repeating Characters Hash Table, String, Divide and Conquer, Sliding Window
0396 Rotate Function Array, Math, Dynamic Programming
0397 Integer Replacement Dynamic Programming, Greedy, Bit Manipulation, Memoization
0398 Random Pick Index Hash Table, Math, Reservoir Sampling, Randomized
0399 Evaluate Division Array, String, Depth-First Search, Breadth-First Search, Union Find, Graph, Shortest Path
0400 Nth Digit Math, Binary Search
0402 Remove K Digits String, Stack, Greedy, Monotonic Stack
0406 Queue Reconstruction by Height Array, Binary Indexed Tree, Segment Tree, Sorting
0413 Arithmetic Slices Array, Dynamic Programming, Sliding Window
0416 Partition Equal Subset Sum Array, Dynamic Programming
0417 Pacific Atlantic Water Flow Array, Depth-First Search, Breadth-First Search, Matrix
0419 Battleships in a Board Array, Depth-First Search, Matrix
0421 Maximum XOR of Two Numbers in an Array Array, Hash Table, Bit Manipulation, Trie
0423 Reconstruct Original Digits from English Hash Table, Math, String
0424 Longest Repeating Character Replacement Hash Table, String, Sliding Window
0427 Construct Quad Tree Array, Divide and Conquer, Tree, Matrix
0429 N-ary Tree Level Order Traversal Tree, Breadth-First Search
0430 Flatten a Multilevel Doubly Linked List Linked List, Depth-First Search, Doubly-Linked List
0433 Minimum Genetic Mutation Hash Table, String, Breadth-First Search
0435 Non-overlapping Intervals Array, Dynamic Programming, Greedy, Sorting
0437 Path Sum III Tree, Depth-First Search, Binary Tree
0438 Find All Anagrams in a String Hash Table, String, Sliding Window
0442 Find All Duplicates in an Array Array, Hash Table
0443 String Compression Two Pointers, String
0445 Add Two Numbers II Linked List, Math, Stack
0447 Number of Boomerangs Array, Hash Table, Math
0449 Serialize and Deserialize BST String, Tree, Depth-First Search, Breadth-First Search, Design, Binary Search Tree, Binary Tree
0450 Delete Node in a BST Tree, Binary Search Tree, Binary Tree
0451 Sort Characters By Frequency Hash Table, String, Sorting, Heap (Priority Queue), Bucket Sort, Counting
0452 Minimum Number of Arrows to Burst Balloons Array, Greedy, Sorting
0453 Minimum Moves to Equal Array Elements Array, Math
0454 4Sum II Array, Hash Table
0456 132 Pattern Array, Binary Search, Stack, Monotonic Stack, Ordered Set
0457 Circular Array Loop Array, Hash Table, Two Pointers
0462 Minimum Moves to Equal Array Elements II Array, Math, Sorting
0464 Can I Win Math, Dynamic Programming, Bit Manipulation, Memoization, Game Theory, Bitmask
0467 Unique Substrings in Wraparound String String, Dynamic Programming
0468 Validate IP Address String
0470 Implement Rand10() Using Rand7() Math, Rejection Sampling, Randomized, Probability and Statistics
0473 Matchsticks to Square Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
0474 Ones and Zeroes Array, String, Dynamic Programming
0475 Heaters Array, Two Pointers, Binary Search, Sorting
0477 Total Hamming Distance Array, Math, Bit Manipulation
0478 Generate Random Point in a Circle Math, Geometry, Rejection Sampling, Randomized
0481 Magical String Two Pointers, String
0486 Predict the Winner Array, Math, Dynamic Programming, Recursion, Game Theory
0491 Non-decreasing Subsequences Array, Hash Table, Backtracking, Bit Manipulation
0494 Target Sum Array, Dynamic Programming, Backtracking
0497 Random Point in Non-overlapping Rectangles Array, Math, Binary Search, Reservoir Sampling, Prefix Sum, Ordered Set, Randomized
0498 Diagonal Traverse Array, Matrix, Simulation
0503 Next Greater Element II Array, Stack, Monotonic Stack
0508 Most Frequent Subtree Sum Hash Table, Tree, Depth-First Search, Binary Tree
0513 Find Bottom Left Tree Value Tree, Depth-First Search, Breadth-First Search, Binary Tree
0515 Find Largest Value in Each Tree Row Tree, Depth-First Search, Breadth-First Search, Binary Tree
0516 Longest Palindromic Subsequence String, Dynamic Programming
0518 Coin Change II Array, Dynamic Programming
0519 Random Flip Matrix Hash Table, Math, Reservoir Sampling, Randomized
0522 Longest Uncommon Subsequence II Array, Hash Table, Two Pointers, String, Sorting
0523 Continuous Subarray Sum Array, Hash Table, Math, Prefix Sum
0524 Longest Word in Dictionary through Deleting Array, Two Pointers, String, Sorting
0525 Contiguous Array Array, Hash Table, Prefix Sum
0526 Beautiful Arrangement Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
0528 Random Pick with Weight Array, Math, Binary Search, Prefix Sum, Randomized
0529 Minesweeper Array, Depth-First Search, Breadth-First Search, Matrix
0532 K-diff Pairs in an Array Array, Hash Table, Two Pointers, Binary Search, Sorting
0535 Encode and Decode TinyURL Hash Table, String, Design, Hash Function
0537 Complex Number Multiplication Math, String, Simulation
0538 Convert BST to Greater Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree
0539 Minimum Time Difference Array, Math, String, Sorting
0540 Single Element in a Sorted Array Array, Binary Search
0542 01 Matrix Array, Dynamic Programming, Breadth-First Search, Matrix
0547 Number of Provinces Depth-First Search, Breadth-First Search, Union Find, Graph
0550 Game Play Analysis IV Database
0553 Optimal Division Array, Math, Dynamic Programming
0554 Brick Wall Array, Hash Table
0556 Next Greater Element III Math, Two Pointers, String
0558 Logical OR of Two Binary Grids Represented as Quad-Trees Divide and Conquer, Tree
0560 Subarray Sum Equals K Array, Hash Table, Prefix Sum
0565 Array Nesting Array, Depth-First Search
0567 Permutation in String Hash Table, Two Pointers, String, Sliding Window
0570 Managers with at Least 5 Direct Reports Database
0576 Out of Boundary Paths Dynamic Programming
0581 Shortest Unsorted Continuous Subarray Array, Two Pointers, Stack, Greedy, Sorting, Monotonic Stack
0583 Delete Operation for Two Strings String, Dynamic Programming
0585 Investments in 2016 Database
0592 Fraction Addition and Subtraction Math, String, Simulation
0593 Valid Square Math, Geometry
0602 Friend Requests II: Who Has the Most Friends Database
0606 Construct String from Binary Tree String, Tree, Depth-First Search, Binary Tree
0608 Tree Node Database
0609 Find Duplicate File in System Array, Hash Table, String
0611 Valid Triangle Number Array, Two Pointers, Binary Search, Greedy, Sorting
0621 Task Scheduler Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting
0622 Design Circular Queue Array, Linked List, Design, Queue
0623 Add One Row to Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree
0624 Maximum Distance in Arrays Array, Greedy
0626 Exchange Seats Database
0633 Sum of Square Numbers Math, Two Pointers, Binary Search
0636 Exclusive Time of Functions Array, Stack
0638 Shopping Offers Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask
0640 Solve the Equation Math, String, Simulation
0641 Design Circular Deque Array, Linked List, Design, Queue
0646 Maximum Length of Pair Chain Array, Dynamic Programming, Greedy, Sorting
0647 Palindromic Substrings Two Pointers, String, Dynamic Programming
0648 Replace Words Array, Hash Table, String, Trie
0649 Dota2 Senate String, Greedy, Queue
0650 2 Keys Keyboard Math, Dynamic Programming
0652 Find Duplicate Subtrees Hash Table, Tree, Depth-First Search, Binary Tree
0654 Maximum Binary Tree Array, Divide and Conquer, Stack, Tree, Monotonic Stack, Binary Tree
0655 Print Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree
0658 Find K Closest Elements Array, Two Pointers, Binary Search, Sliding Window, Sorting, Heap (Priority Queue)
0659 Split Array into Consecutive Subsequences Array, Hash Table, Greedy, Heap (Priority Queue)
0662 Maximum Width of Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree
0665 Non-decreasing Array Array
0667 Beautiful Arrangement II Array, Math
0669 Trim a Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree
0670 Maximum Swap Math, Greedy
0672 Bulb Switcher II Math, Bit Manipulation, Depth-First Search, Breadth-First Search
0673 Number of Longest Increasing Subsequence Array, Dynamic Programming, Binary Indexed Tree, Segment Tree
0676 Implement Magic Dictionary Hash Table, String, Depth-First Search, Design, Trie
0677 Map Sum Pairs Hash Table, String, Design, Trie
0678 Valid Parenthesis String String, Dynamic Programming, Stack, Greedy
0684 Redundant Connection Depth-First Search, Breadth-First Search, Union Find, Graph
0686 Repeated String Match String, String Matching
0687 Longest Univalue Path Tree, Depth-First Search, Binary Tree
0688 Knight Probability in Chessboard Dynamic Programming
0690 Employee Importance Array, Hash Table, Tree, Depth-First Search, Breadth-First Search
0692 Top K Frequent Words Array, Hash Table, String, Trie, Sorting, Heap (Priority Queue), Bucket Sort, Counting
0695 Max Area of Island Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
0698 Partition to K Equal Sum Subsets Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask
0701 Insert into a Binary Search Tree Tree, Binary Search Tree, Binary Tree
0707 Design Linked List Linked List, Design
0712 Minimum ASCII Delete Sum for Two Strings String, Dynamic Programming
0713 Subarray Product Less Than K Array, Binary Search, Sliding Window, Prefix Sum
0714 Best Time to Buy and Sell Stock with Transaction Fee Array, Dynamic Programming, Greedy
0718 Maximum Length of Repeated Subarray Array, Binary Search, Dynamic Programming, Sliding Window, Rolling Hash, Hash Function
0720 Longest Word in Dictionary Array, Hash Table, String, Trie, Sorting
0721 Accounts Merge Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union Find, Sorting
0722 Remove Comments Array, String
0725 Split Linked List in Parts Linked List
0729 My Calendar I Array, Binary Search, Design, Segment Tree, Ordered Set
0731 My Calendar II Array, Binary Search, Design, Segment Tree, Prefix Sum, Ordered Set
0735 Asteroid Collision Array, Stack, Simulation
0738 Monotone Increasing Digits Math, Greedy
0739 Daily Temperatures Array, Stack, Monotonic Stack
0740 Delete and Earn Array, Hash Table, Dynamic Programming
0743 Network Delay Time Depth-First Search, Breadth-First Search, Graph, Heap (Priority Queue), Shortest Path
0752 Open the Lock Array, Hash Table, String, Breadth-First Search
0754 Reach a Number Math, Binary Search
0756 Pyramid Transition Matrix Bit Manipulation, Depth-First Search, Breadth-First Search
0763 Partition Labels Hash Table, Two Pointers, String, Greedy
0764 Largest Plus Sign Array, Dynamic Programming
0767 Reorganize String Hash Table, String, Greedy, Sorting, Heap (Priority Queue), Counting
0769 Max Chunks To Make Sorted Array, Stack, Greedy, Sorting, Monotonic Stack
0775 Global and Local Inversions Array, Math
0777 Swap Adjacent in LR String Two Pointers, String
0779 K-th Symbol in Grammar Math, Bit Manipulation, Recursion
0781 Rabbits in Forest Array, Hash Table, Math, Greedy
0784 Letter Case Permutation String, Backtracking, Bit Manipulation
0785 Is Graph Bipartite? Depth-First Search, Breadth-First Search, Union Find, Graph
0786 K-th Smallest Prime Fraction Array, Two Pointers, Binary Search, Sorting, Heap (Priority Queue)
0787 Cheapest Flights Within K Stops Dynamic Programming, Depth-First Search, Breadth-First Search, Graph, Heap (Priority Queue), Shortest Path
0788 Rotated Digits Math, Dynamic Programming
0789 Escape The Ghosts Array, Math
0790 Domino and Tromino Tiling Dynamic Programming
0791 Custom Sort String Hash Table, String, Sorting
0792 Number of Matching Subsequences Array, Hash Table, String, Binary Search, Dynamic Programming, Trie, Sorting
0794 Valid Tic-Tac-Toe State Array, Matrix
0795 Number of Subarrays with Bounded Maximum Array, Two Pointers
0797 All Paths From Source to Target Backtracking, Depth-First Search, Breadth-First Search, Graph
0799 Champagne Tower Dynamic Programming
0802 Find Eventual Safe States Depth-First Search, Breadth-First Search, Graph, Topological Sort
0807 Max Increase to Keep City Skyline Array, Greedy, Matrix
0808 Soup Servings Math, Dynamic Programming, Probability and Statistics
0809 Expressive Words Array, Two Pointers, String
0811 Subdomain Visit Count Array, Hash Table, String, Counting
0813 Largest Sum of Averages Array, Dynamic Programming, Prefix Sum
0814 Binary Tree Pruning Tree, Depth-First Search, Binary Tree
0816 Ambiguous Coordinates String, Backtracking, Enumeration
0817 Linked List Components Array, Hash Table, Linked List
0820 Short Encoding of Words Array, Hash Table, String, Trie
0822 Card Flipping Game Array, Hash Table
0823 Binary Trees With Factors Array, Hash Table, Dynamic Programming, Sorting
0825 Friends Of Appropriate Ages Array, Two Pointers, Binary Search, Sorting
0826 Most Profit Assigning Work Array, Two Pointers, Binary Search, Greedy, Sorting
0831 Masking Personal Information String
0833 Find And Replace in String Array, Hash Table, String, Sorting
0835 Image Overlap Array, Matrix
0837 New 21 Game Math, Dynamic Programming, Sliding Window, Probability and Statistics
0838 Push Dominoes Two Pointers, String, Dynamic Programming
0840 Magic Squares In Grid Array, Hash Table, Math, Matrix
0841 Keys and Rooms Depth-First Search, Breadth-First Search, Graph
0842 Split Array into Fibonacci Sequence String, Backtracking
0845 Longest Mountain in Array Array, Two Pointers, Dynamic Programming, Enumeration
0846 Hand of Straights Array, Hash Table, Greedy, Sorting
0848 Shifting Letters Array, String, Prefix Sum
0849 Maximize Distance to Closest Person Array
0851 Loud and Rich Array, Depth-First Search, Graph, Topological Sort
0852 Peak Index in a Mountain Array Array, Binary Search
0853 Car Fleet Array, Stack, Sorting, Monotonic Stack
0855 Exam Room Design, Heap (Priority Queue), Ordered Set
0856 Score of Parentheses String, Stack
0858 Mirror Reflection Math, Geometry, Number Theory
0861 Score After Flipping Matrix Array, Greedy, Bit Manipulation, Matrix
0863 All Nodes Distance K in Binary Tree Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
0865 Smallest Subtree with all the Deepest Nodes Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
0866 Prime Palindrome Math, Number Theory
0869 Reordered Power of 2 Hash Table, Math, Sorting, Counting, Enumeration
0870 Advantage Shuffle Array, Two Pointers, Greedy, Sorting
0873 Length of Longest Fibonacci Subsequence Array, Hash Table, Dynamic Programming
0874 Walking Robot Simulation Array, Hash Table, Simulation
0875 Koko Eating Bananas Array, Binary Search
0877 Stone Game Array, Math, Dynamic Programming, Game Theory
0880 Decoded String at Index String, Stack
0881 Boats to Save People Array, Two Pointers, Greedy, Sorting
0885 Spiral Matrix III Array, Matrix, Simulation
0886 Possible Bipartition Depth-First Search, Breadth-First Search, Union Find, Graph
0889 Construct Binary Tree from Preorder and Postorder Traversal Array, Hash Table, Divide and Conquer, Tree, Binary Tree
0890 Find and Replace Pattern Array, Hash Table, String
0893 Groups of Special-Equivalent Strings Array, Hash Table, String, Sorting
0894 All Possible Full Binary Trees Dynamic Programming, Tree, Recursion, Memoization, Binary Tree
0898 Bitwise ORs of Subarrays Array, Dynamic Programming, Bit Manipulation
0900 RLE Iterator Array, Design, Counting, Iterator
0901 Online Stock Span Stack, Design, Monotonic Stack, Data Stream
0904 Fruit Into Baskets Array, Hash Table, Sliding Window
0907 Sum of Subarray Minimums Array, Dynamic Programming, Stack, Monotonic Stack
0909 Snakes and Ladders Array, Breadth-First Search, Matrix
0910 Smallest Range II Array, Math, Greedy, Sorting
0911 Online Election Array, Hash Table, Binary Search, Design
0912 Sort an Array Array, Divide and Conquer, Sorting, Heap (Priority Queue), Merge Sort, Bucket Sort, Radix Sort, Counting Sort
0915 Partition Array into Disjoint Intervals Array
0916 Word Subsets Array, Hash Table, String
0918 Maximum Sum Circular Subarray Array, Divide and Conquer, Dynamic Programming, Queue, Monotonic Queue
0919 Complete Binary Tree Inserter Tree, Breadth-First Search, Design, Binary Tree
0921 Minimum Add to Make Parentheses Valid String, Stack, Greedy
0923 3Sum With Multiplicity Array, Hash Table, Two Pointers, Sorting, Counting
0926 Flip String to Monotone Increasing String, Dynamic Programming
0930 Binary Subarrays With Sum Array, Hash Table, Sliding Window, Prefix Sum
0931 Minimum Falling Path Sum Array, Dynamic Programming, Matrix
0932 Beautiful Array Array, Math, Divide and Conquer
0934 Shortest Bridge Array, Depth-First Search, Breadth-First Search, Matrix
0935 Knight Dialer Dynamic Programming
0937 Reorder Data in Log Files Array, String, Sorting
0939 Minimum Area Rectangle Array, Hash Table, Math, Geometry, Sorting
0945 Minimum Increment to Make Array Unique Array, Greedy, Sorting, Counting
0946 Validate Stack Sequences Array, Stack, Simulation
0947 Most Stones Removed with Same Row or Column Hash Table, Depth-First Search, Union Find, Graph
0948 Bag of Tokens Array, Two Pointers, Greedy, Sorting
0949 Largest Time for Given Digits Array, String, Backtracking, Enumeration
0950 Reveal Cards In Increasing Order Array, Queue, Sorting, Simulation
0951 Flip Equivalent Binary Trees Tree, Depth-First Search, Binary Tree
0954 Array of Doubled Pairs Array, Hash Table, Greedy, Sorting
0955 Delete Columns to Make Sorted II Array, String, Greedy
0957 Prison Cells After N Days Array, Hash Table, Math, Bit Manipulation
0958 Check Completeness of a Binary Tree Tree, Breadth-First Search, Binary Tree
0959 Regions Cut By Slashes Array, Hash Table, Depth-First Search, Breadth-First Search, Union Find, Matrix
0962 Maximum Width Ramp Array, Two Pointers, Stack, Monotonic Stack
0963 Minimum Area Rectangle II Array, Hash Table, Math, Geometry
0966 Vowel Spellchecker Array, Hash Table, String
0967 Numbers With Same Consecutive Differences Backtracking, Breadth-First Search
0969 Pancake Sorting Array, Two Pointers, Greedy, Sorting
0970 Powerful Integers Hash Table, Math, Enumeration
0971 Flip Binary Tree To Match Preorder Traversal Tree, Depth-First Search, Binary Tree
0973 K Closest Points to Origin Array, Math, Divide and Conquer, Geometry, Sorting, Heap (Priority Queue), Quickselect
0974 Subarray Sums Divisible by K Array, Hash Table, Prefix Sum
0978 Longest Turbulent Subarray Array, Dynamic Programming, Sliding Window
0979 Distribute Coins in Binary Tree Tree, Depth-First Search, Binary Tree
0981 Time Based Key-Value Store Hash Table, String, Binary Search, Design
0983 Minimum Cost For Tickets Array, Dynamic Programming
0984 String Without AAA or BBB String, Greedy
0985 Sum of Even Numbers After Queries Array, Simulation
0986 Interval List Intersections Array, Two Pointers, Line Sweep
0988 Smallest String Starting From Leaf String, Backtracking, Tree, Depth-First Search, Binary Tree
0990 Satisfiability of Equality Equations Array, String, Union Find, Graph
0991 Broken Calculator Math, Greedy
0994 Rotting Oranges Array, Breadth-First Search, Matrix
0998 Maximum Binary Tree II Tree, Binary Tree
1003 Check If Word Is Valid After Substitutions String, Stack
1004 Max Consecutive Ones III Array, Binary Search, Sliding Window, Prefix Sum
1006 Clumsy Factorial Math, Stack, Simulation
1007 Minimum Domino Rotations For Equal Row Array, Greedy
1008 Construct Binary Search Tree from Preorder Traversal Array, Stack, Tree, Binary Search Tree, Monotonic Stack, Binary Tree
1010 Pairs of Songs With Total Durations Divisible by 60 Array, Hash Table, Counting
1011 Capacity To Ship Packages Within D Days Array, Binary Search
1014 Best Sightseeing Pair Array, Dynamic Programming
1015 Smallest Integer Divisible by K Hash Table, Math
1016 Binary String With Substrings Representing 1 To N Hash Table, String, Bit Manipulation, Sliding Window
1017 Convert to Base -2 Math
1019 Next Greater Node In Linked List Array, Linked List, Stack, Monotonic Stack
1020 Number of Enclaves Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
1023 Camelcase Matching Array, Two Pointers, String, Trie, String Matching
1024 Video Stitching Array, Dynamic Programming, Greedy
1026 Maximum Difference Between Node and Ancestor Tree, Depth-First Search, Binary Tree
1027 Longest Arithmetic Subsequence Array, Hash Table, Binary Search, Dynamic Programming
1029 Two City Scheduling Array, Greedy, Sorting
1031 Maximum Sum of Two Non-Overlapping Subarrays Array, Dynamic Programming, Sliding Window
1033 Moving Stones Until Consecutive Math, Brainteaser
1034 Coloring A Border Array, Depth-First Search, Breadth-First Search, Matrix
1035 Uncrossed Lines Array, Dynamic Programming
1038 Binary Search Tree to Greater Sum Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree
1039 Minimum Score Triangulation of Polygon Array, Dynamic Programming
1040 Moving Stones Until Consecutive II Array, Math, Sliding Window, Sorting
1041 Robot Bounded In Circle Math, String, Simulation
1042 Flower Planting With No Adjacent Depth-First Search, Breadth-First Search, Graph
1043 Partition Array for Maximum Sum Array, Dynamic Programming
1045 Customers Who Bought All Products Database
1048 Longest String Chain Array, Hash Table, Two Pointers, String, Dynamic Programming, Sorting
1049 Last Stone Weight II Array, Dynamic Programming
1052 Grumpy Bookstore Owner Array, Sliding Window
1053 Previous Permutation With One Swap Array, Greedy
1054 Distant Barcodes Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting
1061 Lexicographically Smallest Equivalent String String, Union Find
1070 Product Sales Analysis III Database
1072 Flip Columns For Maximum Number of Equal Rows Array, Hash Table, Matrix
1073 Adding Two Negabinary Numbers Array, Math
1079 Letter Tile Possibilities Hash Table, String, Backtracking, Counting
1080 Insufficient Nodes in Root to Leaf Paths Tree, Depth-First Search, Binary Tree
1081 Smallest Subsequence of Distinct Characters String, Stack, Greedy, Monotonic Stack
1090 Largest Values From Labels Array, Hash Table, Greedy, Sorting, Counting
1091 Shortest Path in Binary Matrix Array, Breadth-First Search, Matrix
1093 Statistics from a Large Sample Array, Math, Probability and Statistics
1094 Car Pooling Array, Sorting, Heap (Priority Queue), Simulation, Prefix Sum
1104 Path In Zigzag Labelled Binary Tree Math, Tree, Binary Tree
1105 Filling Bookcase Shelves Array, Dynamic Programming
1109 Corporate Flight Bookings Array, Prefix Sum
1110 Delete Nodes And Return Forest Array, Hash Table, Tree, Depth-First Search, Binary Tree
1111 Maximum Nesting Depth of Two Valid Parentheses Strings String, Stack
1115 Print FooBar Alternately Concurrency
1116 Print Zero Even Odd Concurrency
1117 Building H2O Concurrency
1123 Lowest Common Ancestor of Deepest Leaves Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
1124 Longest Well-Performing Interval Array, Hash Table, Stack, Monotonic Stack, Prefix Sum
1129 Shortest Path with Alternating Colors Breadth-First Search, Graph
1130 Minimum Cost Tree From Leaf Values Array, Dynamic Programming, Stack, Greedy, Monotonic Stack
1131 Maximum of Absolute Value Expression Array, Math
1138 Alphabet Board Path Hash Table, String
1139 Largest 1-Bordered Square Array, Dynamic Programming, Matrix
1140 Stone Game II Array, Math, Dynamic Programming, Prefix Sum, Game Theory
1143 Longest Common Subsequence String, Dynamic Programming
1144 Decrease Elements To Make Array Zigzag Array, Greedy
1145 Binary Tree Coloring Game Tree, Depth-First Search, Binary Tree
1146 Snapshot Array Array, Hash Table, Binary Search, Design
1155 Number of Dice Rolls With Target Sum Dynamic Programming
1156 Swap For Longest Repeated Character Substring Hash Table, String, Sliding Window
1158 Market Analysis I Database
1161 Maximum Level Sum of a Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree
1162 As Far from Land as Possible Array, Dynamic Programming, Breadth-First Search, Matrix
1164 Product Price at a Given Date Database
1169 Invalid Transactions Array, Hash Table, String, Sorting
1170 Compare Strings by Frequency of the Smallest Character Array, Hash Table, String, Binary Search, Sorting
1171 Remove Zero Sum Consecutive Nodes from Linked List Hash Table, Linked List
1174 Immediate Food Delivery II Database
1177 Can Make Palindrome from Substring Array, Hash Table, String, Bit Manipulation, Prefix Sum
1186 Maximum Subarray Sum with One Deletion Array, Dynamic Programming
1190 Reverse Substrings Between Each Pair of Parentheses String, Stack
1191 K-Concatenation Maximum Sum Array, Dynamic Programming
1193 Monthly Transactions I Database
1195 Fizz Buzz Multithreaded Concurrency
1201 Ugly Number III Math, Binary Search, Combinatorics, Number Theory
1202 Smallest String With Swaps Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union Find, Sorting
1204 Last Person to Fit in the Bus Database
1208 Get Equal Substrings Within Budget String, Binary Search, Sliding Window, Prefix Sum
1209 Remove All Adjacent Duplicates in String II String, Stack
1218 Longest Arithmetic Subsequence of Given Difference Array, Hash Table, Dynamic Programming
1219 Path with Maximum Gold Array, Backtracking, Matrix
1222 Queens That Can Attack the King Array, Matrix, Simulation
1226 The Dining Philosophers Concurrency
1227 Airplane Seat Assignment Probability Math, Dynamic Programming, Brainteaser, Probability and Statistics
1233 Remove Sub-Folders from the Filesystem Array, String, Depth-First Search, Trie
1234 Replace the Substring for Balanced String String, Sliding Window
1237 Find Positive Integer Solution for a Given Equation Math, Two Pointers, Binary Search, Interactive
1238 Circular Permutation in Binary Representation Math, Backtracking, Bit Manipulation
1239 Maximum Length of a Concatenated String with Unique Characters Array, String, Backtracking, Bit Manipulation
1247 Minimum Swaps to Make Strings Equal Math, String, Greedy
1248 Count Number of Nice Subarrays Array, Hash Table, Math, Sliding Window, Prefix Sum
1249 Minimum Remove to Make Valid Parentheses String, Stack
1253 Reconstruct a 2-Row Binary Matrix Array, Greedy, Matrix
1254 Number of Closed Islands Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
1261 Find Elements in a Contaminated Binary Tree Hash Table, Tree, Depth-First Search, Breadth-First Search, Design, Binary Tree
1262 Greatest Sum Divisible by Three Array, Dynamic Programming, Greedy, Sorting
1267 Count Servers that Communicate Array, Depth-First Search, Breadth-First Search, Union Find, Matrix, Counting
1268 Search Suggestions System Array, String, Binary Search, Trie, Sorting, Heap (Priority Queue)
1276 Number of Burgers with No Waste of Ingredients Math
1277 Count Square Submatrices with All Ones Array, Dynamic Programming, Matrix
1282 Group the People Given the Group Size They Belong To Array, Hash Table, Greedy
1283 Find the Smallest Divisor Given a Threshold Array, Binary Search
1286 Iterator for Combination String, Backtracking, Design, Iterator
1288 Remove Covered Intervals Array, Sorting
1291 Sequential Digits Enumeration
1292 Maximum Side Length of a Square with Sum Less than or Equal to Threshold Array, Binary Search, Matrix, Prefix Sum
1296 Divide Array in Sets of K Consecutive Numbers Array, Hash Table, Greedy, Sorting
1297 Maximum Number of Occurrences of a Substring Hash Table, String, Sliding Window
1300 Sum of Mutated Array Closest to Target Array, Binary Search, Sorting
1302 Deepest Leaves Sum Tree, Depth-First Search, Breadth-First Search, Binary Tree
1305 All Elements in Two Binary Search Trees Tree, Depth-First Search, Binary Search Tree, Sorting, Binary Tree
1306 Jump Game III Array, Depth-First Search, Breadth-First Search
1310 XOR Queries of a Subarray Array, Bit Manipulation, Prefix Sum
1311 Get Watched Videos by Your Friends Array, Hash Table, Breadth-First Search, Graph, Sorting
1314 Matrix Block Sum Array, Matrix, Prefix Sum
1315 Sum of Nodes with Even-Valued Grandparent Tree, Depth-First Search, Breadth-First Search, Binary Tree
1318 Minimum Flips to Make a OR b Equal to c Bit Manipulation
1319 Number of Operations to Make Network Connected Depth-First Search, Breadth-First Search, Union Find, Graph
1321 Restaurant Growth Database
1324 Print Words Vertically Array, String, Simulation
1325 Delete Leaves With a Given Value Tree, Depth-First Search, Binary Tree
1328 Break a Palindrome String, Greedy
1329 Sort the Matrix Diagonally Array, Sorting, Matrix
1333 Filter Restaurants by Vegan-Friendly, Price and Distance Array, Sorting
1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance Dynamic Programming, Graph, Shortest Path
1338 Reduce Array Size to The Half Array, Hash Table, Greedy, Sorting, Heap (Priority Queue)
1339 Maximum Product of Splitted Binary Tree Tree, Depth-First Search, Binary Tree
1341 Movie Rating Database
1343 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Array, Sliding Window
1344 Angle Between Hands of a Clock Math
1347 Minimum Number of Steps to Make Two Strings Anagram Hash Table, String, Counting
1348 Tweet Counts Per Frequency Hash Table, Binary Search, Design, Sorting, Ordered Set
1352 Product of the Last K Numbers Array, Math, Design, Data Stream, Prefix Sum
1353 Maximum Number of Events That Can Be Attended Array, Greedy, Sorting, Heap (Priority Queue)
1357 Apply Discount Every n Orders Array, Hash Table, Design
1358 Number of Substrings Containing All Three Characters Hash Table, String, Sliding Window
1361 Validate Binary Tree Nodes Tree, Depth-First Search, Breadth-First Search, Union Find, Graph, Binary Tree
1362 Closest Divisors Math
1366 Rank Teams by Votes Array, Hash Table, String, Sorting, Counting
1367 Linked List in Binary Tree Linked List, Tree, Depth-First Search, Binary Tree
1371 Find the Longest Substring Containing Vowels in Even Counts Hash Table, String, Bit Manipulation, Prefix Sum
1372 Longest ZigZag Path in a Binary Tree Dynamic Programming, Tree, Depth-First Search, Binary Tree
1375 Number of Times Binary String Is Prefix-Aligned Array
1376 Time Needed to Inform All Employees Tree, Depth-First Search, Breadth-First Search
1381 Design a Stack With Increment Operation Array, Stack, Design
1382 Balance a Binary Search Tree Divide and Conquer, Greedy, Tree, Depth-First Search, Binary Search Tree, Binary Tree
1386 Cinema Seat Allocation Array, Hash Table, Greedy, Bit Manipulation
1387 Sort Integers by The Power Value Dynamic Programming, Memoization, Sorting
1390 Four Divisors Array, Math
1391 Check if There is a Valid Path in a Grid Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
1393 Capital Gain/Loss Database
1395 Count Number of Teams Array, Dynamic Programming, Binary Indexed Tree, Segment Tree
1396 Design Underground System Hash Table, String, Design
1400 Construct K Palindrome Strings Hash Table, String, Greedy, Counting
1401 Circle and Rectangle Overlapping Math, Geometry
1404 Number of Steps to Reduce a Number in Binary Representation to One String, Bit Manipulation, Simulation
1405 Longest Happy String String, Greedy, Heap (Priority Queue)
1409 Queries on a Permutation With Key Array, Binary Indexed Tree, Simulation
1410 HTML Entity Parser Hash Table, String
1414 Find the Minimum Number of Fibonacci Numbers Whose Sum Is K Math, Greedy
1415 The k-th Lexicographical String of All Happy Strings of Length n String, Backtracking
1418 Display Table of Food Orders in a Restaurant Array, Hash Table, String, Sorting, Ordered Set
1419 Minimum Number of Frogs Croaking String, Counting
1423 Maximum Points You Can Obtain from Cards Array, Sliding Window, Prefix Sum
1424 Diagonal Traverse II Array, Sorting, Heap (Priority Queue)
1432 Max Difference You Can Get From Changing an Integer Math, Greedy
1433 Check If a String Can Break Another String String, Greedy, Sorting
1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Array, Queue, Sliding Window, Heap (Priority Queue), Ordered Set, Monotonic Queue
1441 Build an Array With Stack Operations Array, Stack, Simulation
1442 Count Triplets That Can Form Two Arrays of Equal XOR Array, Hash Table, Math, Bit Manipulation, Prefix Sum
1443 Minimum Time to Collect All Apples in a Tree Hash Table, Tree, Depth-First Search, Breadth-First Search
1447 Simplified Fractions Math, String, Number Theory
1448 Count Good Nodes in Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree
1451 Rearrange Words in a Sentence String, Sorting
1452 People Whose List of Favorite Companies Is Not a Subset of Another List Array, Hash Table, String
1456 Maximum Number of Vowels in a Substring of Given Length String, Sliding Window
1457 Pseudo-Palindromic Paths in a Binary Tree Bit Manipulation, Tree, Depth-First Search, Breadth-First Search, Binary Tree
1461 Check If a String Contains All Binary Codes of Size K Hash Table, String, Bit Manipulation, Rolling Hash, Hash Function
1462 Course Schedule IV Depth-First Search, Breadth-First Search, Graph, Topological Sort
1465 Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts Array, Greedy, Sorting
1466 Reorder Routes to Make All Paths Lead to the City Zero Depth-First Search, Breadth-First Search, Graph
1471 The k Strongest Values in an Array Array, Two Pointers, Sorting
1472 Design Browser History Array, Linked List, Stack, Design, Doubly-Linked List, Data Stream
1476 Subrectangle Queries Array, Design, Matrix
1477 Find Two Non-overlapping Sub-arrays Each With Target Sum Array, Hash Table, Binary Search, Dynamic Programming, Sliding Window
1481 Least Number of Unique Integers after K Removals Array, Hash Table, Greedy, Sorting, Counting
1482 Minimum Number of Days to Make m Bouquets Array, Binary Search
1487 Making File Names Unique Array, Hash Table, String
1488 Avoid Flood in The City Array, Hash Table, Binary Search, Greedy, Heap (Priority Queue)
1492 The kth Factor of n Math, Number Theory
1493 Longest Subarray of 1's After Deleting One Element Array, Dynamic Programming, Sliding Window
1497 Check If Array Pairs Are Divisible by k Array, Hash Table, Counting
1498 Number of Subsequences That Satisfy the Given Sum Condition Array, Two Pointers, Binary Search, Sorting
1503 Last Moment Before All Ants Fall Out of a Plank Array, Brainteaser, Simulation
1504 Count Submatrices With All Ones Array, Dynamic Programming, Stack, Matrix, Monotonic Stack
1508 Range Sum of Sorted Subarray Sums Array, Two Pointers, Binary Search, Sorting, Prefix Sum
1509 Minimum Difference Between Largest and Smallest Value in Three Moves Array, Greedy, Sorting
1513 Number of Substrings With Only 1s Math, String
1514 Path with Maximum Probability Array, Graph, Heap (Priority Queue), Shortest Path
1519 Number of Nodes in the Sub-Tree With the Same Label Hash Table, Tree, Depth-First Search, Breadth-First Search, Counting
1524 Number of Sub-arrays With Odd Sum Array, Math, Dynamic Programming, Prefix Sum
1525 Number of Good Ways to Split a String Hash Table, String, Dynamic Programming, Bit Manipulation
1529 Minimum Suffix Flips String, Greedy
1530 Number of Good Leaf Nodes Pairs Tree, Depth-First Search, Binary Tree
1535 Find the Winner of an Array Game Array, Simulation
1536 Minimum Swaps to Arrange a Binary Grid Array, Greedy, Matrix
1540 Can Convert String in K Moves Hash Table, String
1541 Minimum Insertions to Balance a Parentheses String String, Stack, Greedy
1545 Find Kth Bit in Nth Binary String String, Recursion, Simulation
1546 Maximum Number of Non-Overlapping Subarrays With Sum Equals Target Array, Hash Table, Greedy, Prefix Sum
1551 Minimum Operations to Make Array Equal Math
1552 Magnetic Force Between Two Balls Array, Binary Search, Sorting
1557 Minimum Number of Vertices to Reach All Nodes Graph
1558 Minimum Numbers of Function Calls to Make Target Array Array, Greedy, Bit Manipulation
1559 Detect Cycles in 2D Grid Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
1561 Maximum Number of Coins You Can Get Array, Math, Greedy, Sorting, Game Theory
1562 Find Latest Group of Size M Array, Hash Table, Binary Search, Simulation
1567 Maximum Length of Subarray With Positive Product Array, Dynamic Programming, Greedy
1573 Number of Ways to Split a String Math, String
1574 Shortest Subarray to be Removed to Make Array Sorted Array, Two Pointers, Binary Search, Stack, Monotonic Stack
1577 Number of Ways Where Square of Number Is Equal to Product of Two Numbers Array, Hash Table, Math, Two Pointers
1578 Minimum Time to Make Rope Colorful Array, String, Dynamic Programming, Greedy
1583 Count Unhappy Friends Array, Simulation
1584 Min Cost to Connect All Points Array, Union Find, Graph, Minimum Spanning Tree
1589 Maximum Sum Obtained of Any Permutation Array, Greedy, Sorting, Prefix Sum
1590 Make Sum Divisible by P Array, Hash Table, Prefix Sum
1593 Split a String Into the Max Number of Unique Substrings Hash Table, String, Backtracking
1594 Maximum Non Negative Product in a Matrix Array, Dynamic Programming, Matrix
1599 Maximum Profit of Operating a Centennial Wheel Array, Simulation
1600 Throne Inheritance Hash Table, Tree, Depth-First Search, Design
1604 Alert Using Same Key-Card Three or More Times in a One Hour Period Array, Hash Table, String, Sorting
1605 Find Valid Matrix Given Row and Column Sums Array, Greedy, Matrix
1609 Even Odd Tree Tree, Breadth-First Search, Binary Tree
1615 Maximal Network Rank Graph
1616 Split Two Strings to Make Palindrome Two Pointers, String
1620 Coordinate With Maximum Network Quality Array, Enumeration
1621 Number of Sets of K Non-Overlapping Line Segments Math, Dynamic Programming, Combinatorics
1625 Lexicographically Smallest String After Applying Operations String, Depth-First Search, Breadth-First Search, Enumeration
1626 Best Team With No Conflicts Array, Dynamic Programming, Sorting
1630 Arithmetic Subarrays Array, Hash Table, Sorting
1631 Path With Minimum Effort Array, Binary Search, Depth-First Search, Breadth-First Search, Union Find, Heap (Priority Queue), Matrix
1638 Count Substrings That Differ by One Character Hash Table, String, Dynamic Programming, Enumeration
1641 Count Sorted Vowel Strings Math, Dynamic Programming, Combinatorics
1642 Furthest Building You Can Reach Array, Greedy, Heap (Priority Queue)
1647 Minimum Deletions to Make Character Frequencies Unique Hash Table, String, Greedy, Sorting
1648 Sell Diminishing-Valued Colored Balls Array, Math, Binary Search, Greedy, Sorting, Heap (Priority Queue)
1653 Minimum Deletions to Make String Balanced String, Dynamic Programming, Stack
1654 Minimum Jumps to Reach Home Array, Dynamic Programming, Breadth-First Search
1657 Determine if Two Strings Are Close Hash Table, String, Sorting, Counting
1658 Minimum Operations to Reduce X to Zero Array, Hash Table, Binary Search, Sliding Window, Prefix Sum
1663 Smallest String With A Given Numeric Value String, Greedy
1664 Ways to Make a Fair Array Array, Prefix Sum
1669 Merge In Between Linked Lists Linked List
1670 Design Front Middle Back Queue Array, Linked List, Design, Queue, Data Stream
1673 Find the Most Competitive Subsequence Array, Stack, Greedy, Monotonic Stack
1674 Minimum Moves to Make Array Complementary Array, Hash Table, Prefix Sum
1679 Max Number of K-Sum Pairs Array, Hash Table, Two Pointers, Sorting
1680 Concatenation of Consecutive Binary Numbers Math, Bit Manipulation, Simulation
1685 Sum of Absolute Differences in a Sorted Array Array, Math, Prefix Sum
1686 Stone Game VI Array, Math, Greedy, Sorting, Heap (Priority Queue), Game Theory
1689 Partitioning Into Minimum Number Of Deci-Binary Numbers String, Greedy
1690 Stone Game VII Array, Math, Dynamic Programming, Game Theory
1695 Maximum Erasure Value Array, Hash Table, Sliding Window
1696 Jump Game VI Array, Dynamic Programming, Queue, Heap (Priority Queue), Monotonic Queue
1701 Average Waiting Time Array, Simulation
1702 Maximum Binary String After Change String, Greedy
1705 Maximum Number of Eaten Apples Array, Greedy, Heap (Priority Queue)
1706 Where Will the Ball Fall Array, Matrix, Simulation
1711 Count Good Meals Array, Hash Table
1712 Ways to Split Array Into Three Subarrays Array, Two Pointers, Binary Search, Prefix Sum
1717 Maximum Score From Removing Substrings String, Stack, Greedy
1718 Construct the Lexicographically Largest Valid Sequence Array, Backtracking
1721 Swapping Nodes in a Linked List Linked List, Two Pointers
1722 Minimize Hamming Distance After Swap Operations Array, Depth-First Search, Union Find
1726 Tuple with Same Product Array, Hash Table, Counting
1727 Largest Submatrix With Rearrangements Array, Greedy, Sorting, Matrix
1733 Minimum Number of People to Teach Array, Hash Table, Greedy
1734 Decode XORed Permutation Array, Bit Manipulation
1737 Change Minimum Characters to Satisfy One of Three Conditions Hash Table, String, Counting, Prefix Sum
1738 Find Kth Largest XOR Coordinate Value Array, Divide and Conquer, Bit Manipulation, Sorting, Heap (Priority Queue), Matrix, Prefix Sum, Quickselect
1743 Restore the Array From Adjacent Pairs Array, Hash Table, Depth-First Search
1744 Can You Eat Your Favorite Candy on Your Favorite Day? Array, Prefix Sum
1749 Maximum Absolute Sum of Any Subarray Array, Dynamic Programming
1750 Minimum Length of String After Deleting Similar Ends Two Pointers, String
1753 Maximum Score From Removing Stones Math, Greedy, Heap (Priority Queue)
1754 Largest Merge Of Two Strings Two Pointers, String, Greedy
1759 Count Number of Homogenous Substrings Math, String
1760 Minimum Limit of Balls in a Bag Array, Binary Search
1764 Form Array by Concatenating Subarrays of Another Array Array, Two Pointers, Greedy, String Matching
1765 Map of Highest Peak Array, Breadth-First Search, Matrix
1769 Minimum Number of Operations to Move All Balls to Each Box Array, String, Prefix Sum
1774 Closest Dessert Cost Array, Dynamic Programming, Backtracking
1775 Equal Sum Arrays With Minimum Number of Operations Array, Hash Table, Greedy, Counting
1780 Check if Number is a Sum of Powers of Three Math
1781 Sum of Beauty of All Substrings Hash Table, String, Counting
1785 Minimum Elements to Add to Form a Given Sum Array, Greedy
1786 Number of Restricted Paths From First to Last Node Dynamic Programming, Graph, Topological Sort, Heap (Priority Queue), Shortest Path
1792 Maximum Average Pass Ratio Array, Greedy, Heap (Priority Queue)
1797 Design Authentication Manager Hash Table, Linked List, Design, Doubly-Linked List
1798 Maximum Number of Consecutive Values You Can Make Array, Greedy, Sorting
1801 Number of Orders in the Backlog Array, Heap (Priority Queue), Simulation
1802 Maximum Value at a Given Index in a Bounded Array Math, Binary Search, Greedy
1806 Minimum Number of Operations to Reinitialize a Permutation Array, Math, Simulation
1807 Evaluate the Bracket Pairs of a String Array, Hash Table, String
1813 Sentence Similarity III Array, Two Pointers, String
1814 Count Nice Pairs in an Array Array, Hash Table, Math, Counting
1817 Finding the Users Active Minutes Array, Hash Table
1818 Minimum Absolute Sum Difference Array, Binary Search, Sorting, Ordered Set
1823 Find the Winner of the Circular Game Array, Math, Recursion, Queue, Simulation
1824 Minimum Sideway Jumps Array, Dynamic Programming, Greedy
1828 Queries on Number of Points Inside a Circle Array, Math, Geometry
1829 Maximum XOR for Each Query Array, Bit Manipulation, Prefix Sum
1833 Maximum Ice Cream Bars Array, Greedy, Sorting, Counting Sort
1834 Single-Threaded CPU Array, Sorting, Heap (Priority Queue)
1838 Frequency of the Most Frequent Element Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
1839 Longest Substring Of All Vowels in Order String, Sliding Window
1845 Seat Reservation Manager Design, Heap (Priority Queue)
1846 Maximum Element After Decreasing and Rearranging Array, Greedy, Sorting
1849 Splitting a String Into Descending Consecutive Values String, Backtracking, Enumeration
1850 Minimum Adjacent Swaps to Reach the Kth Smallest Number Two Pointers, String, Greedy
1855 Maximum Distance Between a Pair of Values Array, Two Pointers, Binary Search
1856 Maximum Subarray Min-Product Array, Stack, Monotonic Stack, Prefix Sum
1860 Incremental Memory Leak Math, Simulation
1861 Rotating the Box Array, Two Pointers, Matrix
1864 Minimum Number of Swaps to Make the Binary String Alternating String, Greedy
1865 Finding Pairs With a Certain Sum Array, Hash Table, Design
1870 Minimum Speed to Arrive on Time Array, Binary Search
1871 Jump Game VII String, Dynamic Programming, Sliding Window, Prefix Sum
1877 Minimize Maximum Pair Sum in Array Array, Two Pointers, Greedy, Sorting
1878 Get Biggest Three Rhombus Sums in a Grid Array, Math, Sorting, Heap (Priority Queue), Matrix, Prefix Sum
1881 Maximum Value after Insertion String, Greedy
1882 Process Tasks Using Servers Array, Heap (Priority Queue)
1884 Egg Drop With 2 Eggs and N Floors Math, Dynamic Programming
1887 Reduction Operations to Make the Array Elements Equal Array, Sorting
1888 Minimum Number of Flips to Make the Binary String Alternating String, Dynamic Programming, Sliding Window
1894 Find the Student that Will Replace the Chalk Array, Binary Search, Simulation, Prefix Sum
1895 Largest Magic Square Array, Matrix, Prefix Sum
1898 Maximum Number of Removable Characters Array, Two Pointers, String, Binary Search
1899 Merge Triplets to Form Target Triplet Array, Greedy
1901 Find a Peak Element II Array, Binary Search, Matrix
1904 The Number of Full Rounds You Have Played Math, String
1905 Count Sub Islands Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
1906 Minimum Absolute Difference Queries Array, Hash Table
1907 Count Salary Categories Database
1910 Remove All Occurrences of a Substring String, Stack, Simulation
1911 Maximum Alternating Subsequence Sum Array, Dynamic Programming
1914 Cyclically Rotating a Grid Array, Matrix, Simulation
1915 Number of Wonderful Substrings Hash Table, String, Bit Manipulation, Prefix Sum
1921 Eliminate Maximum Number of Monsters Array, Greedy, Sorting
1922 Count Good Numbers Math, Recursion
1926 Nearest Exit from Entrance in Maze Array, Breadth-First Search, Matrix
1927 Sum Game Math, String, Greedy, Game Theory
1930 Unique Length-3 Palindromic Subsequences Hash Table, String, Bit Manipulation, Prefix Sum
1934 Confirmation Rate Database
1936 Add Minimum Number of Rungs Array, Greedy
1937 Maximum Number of Points with Cost Array, Dynamic Programming, Matrix
1942 The Number of the Smallest Unoccupied Chair Array, Hash Table, Heap (Priority Queue)
1943 Describe the Painting Array, Hash Table, Sorting, Prefix Sum
1946 Largest Number After Mutating Substring Array, String, Greedy
1947 Maximum Compatibility Score Sum Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
1953 Maximum Number of Weeks for Which You Can Work Array, Greedy
1954 Minimum Garden Perimeter to Collect Enough Apples Math, Binary Search
1958 Check if Move is Legal Array, Matrix, Enumeration
1959 Minimum Total Space Wasted With K Resizing Operations Array, Dynamic Programming
1962 Remove Stones to Minimize the Total Array, Greedy, Heap (Priority Queue)
1963 Minimum Number of Swaps to Make the String Balanced Two Pointers, String, Stack, Greedy
1968 Array With Elements Not Equal to Average of Neighbors Array, Greedy, Sorting
1969 Minimum Non-Zero Product of the Array Elements Math, Greedy, Recursion
1975 Maximum Matrix Sum Array, Greedy, Matrix
1976 Number of Ways to Arrive at Destination Dynamic Programming, Graph, Topological Sort, Shortest Path
1980 Find Unique Binary String Array, Hash Table, String, Backtracking
1981 Minimize the Difference Between Target and Chosen Elements Array, Dynamic Programming, Matrix
1985 Find the Kth Largest Integer in the Array Array, String, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect
1986 Minimum Number of Work Sessions to Finish the Tasks Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
1992 Find All Groups of Farmland Array, Depth-First Search, Breadth-First Search, Matrix
1993 Operations on Tree Array, Hash Table, Tree, Depth-First Search, Breadth-First Search, Design
1996 The Number of Weak Characters in the Game Array, Stack, Greedy, Sorting, Monotonic Stack
1997 First Day Where You Have Been in All the Rooms Array, Dynamic Programming
2001 Number of Pairs of Interchangeable Rectangles Array, Hash Table, Math, Counting, Number Theory
2002 Maximum Product of the Length of Two Palindromic Subsequences String, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
2007 Find Original Array From Doubled Array Array, Hash Table, Greedy, Sorting
2008 Maximum Earnings From Taxi Array, Hash Table, Binary Search, Dynamic Programming, Sorting
2012 Sum of Beauty in the Array Array
2013 Detect Squares Array, Hash Table, Design, Counting
2017 Grid Game Array, Matrix, Prefix Sum
2018 Check if Word Can Be Placed In Crossword Array, Matrix, Enumeration
2023 Number of Pairs of Strings With Concatenation Equal to Target Array, Hash Table, String, Counting
2024 Maximize the Confusion of an Exam String, Binary Search, Sliding Window, Prefix Sum
2028 Find Missing Observations Array, Math, Simulation
2029 Stone Game IX Array, Math, Greedy, Counting, Game Theory
2033 Minimum Operations to Make a Uni-Value Grid Array, Math, Sorting, Matrix
2034 Stock Price Fluctuation Hash Table, Design, Heap (Priority Queue), Data Stream, Ordered Set
2038 Remove Colored Pieces if Both Neighbors are the Same Color Math, String, Greedy, Game Theory
2039 The Time When the Network Becomes Idle Array, Breadth-First Search, Graph
2043 Simple Bank System Array, Hash Table, Design, Simulation
2044 Count Number of Maximum Bitwise-OR Subsets Array, Backtracking, Bit Manipulation, Enumeration
2048 Next Greater Numerically Balanced Number Hash Table, Math, Backtracking, Counting, Enumeration
2049 Count Nodes With the Highest Score Array, Tree, Depth-First Search, Binary Tree
2054 Two Best Non-Overlapping Events Array, Binary Search, Dynamic Programming, Sorting, Heap (Priority Queue)
2055 Plates Between Candles Array, String, Binary Search, Prefix Sum
2058 Find the Minimum and Maximum Number of Nodes Between Critical Points Linked List
2059 Minimum Operations to Convert Number Array, Breadth-First Search
2063 Vowels of All Substrings Math, String, Dynamic Programming, Combinatorics
2064 Minimized Maximum of Products Distributed to Any Store Array, Binary Search, Greedy
2069 Walking Robot Simulation II Design, Simulation
2070 Most Beautiful Item for Each Query Array, Binary Search, Sorting
2074 Reverse Nodes in Even Length Groups Linked List
2075 Decode the Slanted Ciphertext String, Simulation
2079 Watering Plants Array, Simulation
2080 Range Frequency Queries Array, Hash Table, Binary Search, Design, Segment Tree
2086 Minimum Number of Food Buckets to Feed the Hamsters String, Dynamic Programming, Greedy
2087 Minimum Cost Homecoming of a Robot in a Grid Array, Greedy
2090 K Radius Subarray Averages Array, Sliding Window
2091 Removing Minimum and Maximum From Array Array, Greedy
2095 Delete the Middle Node of a Linked List Linked List, Two Pointers
2096 Step-By-Step Directions From a Binary Tree Node to Another String, Tree, Depth-First Search, Binary Tree
2100 Find Good Days to Rob the Bank Array, Dynamic Programming, Prefix Sum
2101 Detonate the Maximum Bombs Array, Math, Depth-First Search, Breadth-First Search, Graph, Geometry
2104 Sum of Subarray Ranges Array, Stack, Monotonic Stack
2105 Watering Plants II Array, Two Pointers, Simulation
2109 Adding Spaces to a String Array, Two Pointers, String, Simulation
2110 Number of Smooth Descent Periods of a Stock Array, Math, Dynamic Programming
2115 Find All Possible Recipes from Given Supplies Array, Hash Table, String, Graph, Topological Sort
2116 Check if a Parentheses String Can Be Valid String, Stack, Greedy
2120 Execution of All Suffix Instructions Staying in a Grid String, Simulation
2121 Intervals Between Identical Elements Array, Hash Table, Prefix Sum
2125 Number of Laser Beams in a Bank Array, Math, String, Matrix
2126 Destroying Asteroids Array, Greedy, Sorting
2130 Maximum Twin Sum of a Linked List Linked List, Two Pointers, Stack
2131 Longest Palindrome by Concatenating Two Letter Words Array, Hash Table, String, Greedy, Counting
2134 Minimum Swaps to Group All 1's Together II Array, Sliding Window
2135 Count Words Obtained After Adding a Letter Array, Hash Table, String, Bit Manipulation, Sorting
2139 Minimum Moves to Reach Target Score Math, Greedy
2140 Solving Questions With Brainpower Array, Dynamic Programming
2145 Count the Hidden Sequences Array, Prefix Sum
2146 K Highest Ranked Items Within a Price Range Array, Breadth-First Search, Sorting, Heap (Priority Queue), Matrix
2149 Rearrange Array Elements by Sign Array, Two Pointers, Simulation
2150 Find All Lonely Numbers in the Array Array, Hash Table, Counting
2155 All Divisions With the Highest Score of a Binary Array Array
2161 Partition Array According to Given Pivot Array, Two Pointers, Simulation
2162 Minimum Cost to Set Cooking Time Math, Enumeration
2165 Smallest Value of the Rearranged Number Math, Sorting
2166 Design Bitset Array, Hash Table, String, Design
2170 Minimum Operations to Make the Array Alternating Array, Hash Table, Greedy, Counting
2171 Removing Minimum Number of Magic Beans Array, Greedy, Sorting, Enumeration, Prefix Sum
2177 Find Three Consecutive Integers That Sum to a Given Number Math, Simulation
2178 Maximum Split of Positive Even Integers Math, Backtracking, Greedy
2181 Merge Nodes in Between Zeros Linked List, Simulation
2182 Construct String With Repeat Limit Hash Table, String, Greedy, Heap (Priority Queue), Counting
2186 Minimum Number of Steps to Make Two Strings Anagram II Hash Table, String, Counting
2187 Minimum Time to Complete Trips Array, Binary Search
2191 Sort the Jumbled Numbers Array, Sorting
2192 All Ancestors of a Node in a Directed Acyclic Graph Depth-First Search, Breadth-First Search, Graph, Topological Sort
2195 Append K Integers With Minimal Sum Array, Math, Greedy, Sorting
2196 Create Binary Tree From Descriptions Array, Hash Table, Tree, Binary Tree
2201 Count Artifacts That Can Be Extracted Array, Hash Table, Simulation
2202 Maximize the Topmost Element After K Moves Array, Greedy
2207 Maximize Number of Subsequences in a String String, Greedy, Prefix Sum
2208 Minimum Operations to Halve Array Sum Array, Greedy, Heap (Priority Queue)
2211 Count Collisions on a Road String, Stack, Simulation
2212 Maximum Points in an Archery Competition Array, Backtracking, Bit Manipulation, Enumeration
2216 Minimum Deletions to Make Array Beautiful Array, Stack, Greedy
2217 Find Palindrome With Fixed Length Array, Math
2221 Find Triangular Sum of an Array Array, Math, Simulation, Combinatorics
2222 Number of Ways to Select Buildings String, Dynamic Programming, Prefix Sum
2225 Find Players With Zero or One Losses Array, Hash Table, Sorting, Counting
2226 Maximum Candies Allocated to K Children Array, Binary Search
2232 Minimize Result by Adding Parentheses to Expression String, Enumeration
2233 Maximum Product After K Increments Array, Greedy, Heap (Priority Queue)
2240 Number of Ways to Buy Pens and Pencils Math, Enumeration
2241 Design an ATM Machine Array, Greedy, Design
2244 Minimum Rounds to Complete All Tasks Array, Hash Table, Greedy, Counting
2245 Maximum Trailing Zeros in a Cornered Path Array, Matrix, Prefix Sum
2249 Count Lattice Points Inside a Circle Array, Hash Table, Math, Geometry, Enumeration
2250 Count Number of Rectangles Containing Each Point Array, Hash Table, Binary Search, Binary Indexed Tree, Sorting
2256 Minimum Average Difference Array, Prefix Sum
2257 Count Unguarded Cells in the Grid Array, Matrix, Simulation
2260 Minimum Consecutive Cards to Pick Up Array, Hash Table, Sliding Window
2261 K Divisible Elements Subarrays Array, Hash Table, Trie, Rolling Hash, Hash Function, Enumeration
2265 Count Nodes Equal to Average of Subtree Tree, Depth-First Search, Binary Tree
2266 Count Number of Texts Hash Table, Math, String, Dynamic Programming
2270 Number of Ways to Split Array Array, Prefix Sum
2271 Maximum White Tiles Covered by a Carpet Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
2274 Maximum Consecutive Floors Without Special Floors Array, Sorting
2275 Largest Combination With Bitwise AND Greater Than Zero Array, Hash Table, Bit Manipulation, Counting
2279 Maximum Bags With Full Capacity of Rocks Array, Greedy, Sorting
2280 Minimum Lines to Represent a Line Chart Array, Math, Geometry, Sorting, Number Theory
2284 Sender With Largest Word Count Array, Hash Table, String, Counting
2285 Maximum Total Importance of Roads Greedy, Graph, Sorting, Heap (Priority Queue)
2288 Apply Discount to Prices String
2289 Steps to Make Array Non-decreasing Array, Linked List, Stack, Monotonic Stack
2294 Partition Array Such That Maximum Difference Is K Array, Greedy, Sorting
2295 Replace Elements in an Array Array, Hash Table, Simulation
2300 Successful Pairs of Spells and Potions Array, Two Pointers, Binary Search, Sorting
2304 Minimum Path Cost in a Grid Array, Dynamic Programming, Matrix
2305 Fair Distribution of Cookies Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask
2310 Sum of Numbers With Units Digit K Math, Dynamic Programming, Greedy, Enumeration
2311 Longest Binary Subsequence Less Than or Equal to K String, Dynamic Programming, Greedy, Memoization
2316 Count Unreachable Pairs of Nodes in an Undirected Graph Depth-First Search, Breadth-First Search, Union Find, Graph
2317 Maximum XOR After Operations Array, Math, Bit Manipulation
2320 Count Number of Ways to Place Houses Dynamic Programming
2326 Spiral Matrix IV Array, Linked List, Matrix, Simulation
2327 Number of People Aware of a Secret Dynamic Programming, Queue, Simulation
2332 The Latest Time to Catch a Bus Array, Two Pointers, Binary Search, Sorting
2333 Minimum Sum of Squared Difference Array, Binary Search, Greedy, Sorting, Heap (Priority Queue)
2336 Smallest Number in Infinite Set Hash Table, Design, Heap (Priority Queue), Ordered Set
2337 Move Pieces to Obtain a String Two Pointers, String
2342 Max Sum of a Pair With Equal Sum of Digits Array, Hash Table, Sorting, Heap (Priority Queue)
2343 Query Kth Smallest Trimmed Number Array, String, Divide and Conquer, Sorting, Heap (Priority Queue), Radix Sort, Quickselect
2348 Number of Zero-Filled Subarrays Array, Math
2349 Design a Number Container System Hash Table, Design, Heap (Priority Queue), Ordered Set
2352 Equal Row and Column Pairs Array, Hash Table, Matrix, Simulation
2353 Design a Food Rating System Array, Hash Table, String, Design, Heap (Priority Queue), Ordered Set
2358 Maximum Number of Groups Entering a Competition Array, Math, Binary Search, Greedy
2359 Find Closest Node to Given Two Nodes Depth-First Search, Graph
2364 Count Number of Bad Pairs Array, Hash Table, Math, Counting
2365 Task Scheduler II Array, Hash Table, Simulation
2368 Reachable Nodes With Restrictions Array, Hash Table, Tree, Depth-First Search, Breadth-First Search, Union Find, Graph
2369 Check if There is a Valid Partition For The Array Array, Dynamic Programming
2370 Longest Ideal Subsequence Hash Table, String, Dynamic Programming
2374 Node With Highest Edge Score Hash Table, Graph
2375 Construct Smallest Number From DI String String, Backtracking, Stack, Greedy
2380 Time Needed to Rearrange a Binary String String, Dynamic Programming, Simulation
2381 Shifting Letters II Array, String, Prefix Sum
2384 Largest Palindromic Number Hash Table, String, Greedy, Counting
2385 Amount of Time for Binary Tree to Be Infected Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
2390 Removing Stars From a String String, Stack, Simulation
2391 Minimum Amount of Time to Collect Garbage Array, String, Prefix Sum
2396 Strictly Palindromic Number Math, Two Pointers, Brainteaser
2397 Maximum Rows Covered by Columns Array, Backtracking, Bit Manipulation, Matrix, Enumeration
2400 Number of Ways to Reach a Position After Exactly k Steps Math, Dynamic Programming, Combinatorics
2401 Longest Nice Subarray Array, Bit Manipulation, Sliding Window
2405 Optimal Partition of String Hash Table, String, Greedy
2406 Divide Intervals Into Minimum Number of Groups Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
2410 Maximum Matching of Players With Trainers Array, Two Pointers, Greedy, Sorting
2411 Smallest Subarrays With Maximum Bitwise OR Array, Binary Search, Bit Manipulation, Sliding Window
2414 Length of the Longest Alphabetical Continuous Substring String
2415 Reverse Odd Levels of Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree
2419 Longest Subarray With Maximum Bitwise AND Array, Bit Manipulation, Brainteaser
2420 Find All Good Indices Array, Dynamic Programming, Prefix Sum
2424 Longest Uploaded Prefix Hash Table, Binary Search, Union Find, Design, Binary Indexed Tree, Segment Tree, Heap (Priority Queue), Ordered Set
2425 Bitwise XOR of All Pairings Array, Bit Manipulation, Brainteaser
2428 Maximum Sum of an Hourglass Array, Matrix, Prefix Sum
2429 Minimize XOR Greedy, Bit Manipulation
2433 Find The Original Array of Prefix Xor Array, Bit Manipulation
2434 Using a Robot to Print the Lexicographically Smallest String Hash Table, String, Stack, Greedy
2438 Range Product Queries of Powers Array, Bit Manipulation, Prefix Sum
2439 Minimize Maximum of Array Array, Binary Search, Dynamic Programming, Greedy, Prefix Sum
2442 Count Number of Distinct Integers After Reverse Operations Array, Hash Table, Math, Counting
2443 Sum of Number and Its Reverse Math, Enumeration
2447 Number of Subarrays With GCD Equal to K Array, Math, Number Theory
2452 Words Within Two Edits of Dictionary Array, String, Trie
2453 Destroy Sequential Targets Array, Hash Table, Counting
2456 Most Popular Video Creator Array, Hash Table, String, Sorting, Heap (Priority Queue)
2457 Minimum Addition to Make Integer Beautiful Math, Greedy
2461 Maximum Sum of Distinct Subarrays With Length K Array, Hash Table, Sliding Window
2462 Total Cost to Hire K Workers Array, Two Pointers, Heap (Priority Queue), Simulation
2466 Count Ways To Build Good Strings Dynamic Programming
2467 Most Profitable Path in a Tree Array, Tree, Depth-First Search, Breadth-First Search, Graph
2470 Number of Subarrays With LCM Equal to K Array, Math, Number Theory
2471 Minimum Number of Operations to Sort a Binary Tree by Level Tree, Breadth-First Search, Binary Tree
2476 Closest Nodes Queries in a Binary Search Tree Array, Binary Search, Tree, Depth-First Search, Binary Search Tree, Binary Tree
2477 Minimum Fuel Cost to Report to the Capital Tree, Depth-First Search, Breadth-First Search, Graph
2482 Difference Between Ones and Zeros in Row and Column Array, Matrix, Simulation
2483 Minimum Penalty for a Shop String, Prefix Sum
2486 Append Characters to String to Make Subsequence Two Pointers, String, Greedy
2487 Remove Nodes From Linked List Linked List, Stack, Recursion, Monotonic Stack
2491 Divide Players Into Teams of Equal Skill Array, Hash Table, Two Pointers, Sorting
2492 Minimum Score of a Path Between Two Cities Depth-First Search, Breadth-First Search, Union Find, Graph
2497 Maximum Star Sum of a Graph Array, Greedy, Graph, Sorting, Heap (Priority Queue)
2498 Frog Jump II Array, Binary Search, Greedy
2501 Longest Square Streak in an Array Array, Hash Table, Binary Search, Dynamic Programming, Sorting
2502 Design Memory Allocator Array, Hash Table, Design, Simulation
2507 Smallest Value After Replacing With Sum of Prime Factors Math, Simulation, Number Theory
2512 Reward Top K Students Array, Hash Table, String, Sorting, Heap (Priority Queue)
2513 Minimize the Maximum of Two Arrays Math, Binary Search, Number Theory
2516 Take K of Each Character From Left and Right Hash Table, String, Sliding Window
2517 Maximum Tastiness of Candy Basket Array, Binary Search, Greedy, Sorting
2521 Distinct Prime Factors of Product of Array Array, Hash Table, Math, Number Theory
2522 Partition String Into Substrings With Values at Most K String, Dynamic Programming, Greedy
2523 Closest Prime Numbers in Range Math, Number Theory
2526 Find Consecutive Integers from a Data Stream Hash Table, Design, Queue, Counting, Data Stream
2527 Find Xor-Beauty of Array Array, Math, Bit Manipulation
2530 Maximal Score After Applying K Operations Array, Greedy, Heap (Priority Queue)
2531 Make Number of Distinct Characters Equal Hash Table, String, Counting
2536 Increment Submatrices by One Array, Matrix, Prefix Sum
2537 Count the Number of Good Subarrays Array, Hash Table, Sliding Window
2541 Minimum Operations to Make Array Equal II Array, Math, Greedy
2542 Maximum Subsequence Score Array, Greedy, Sorting, Heap (Priority Queue)
2545 Sort the Students by Their Kth Score Array, Sorting, Matrix
2546 Apply Bitwise Operations to Make Strings Equal String, Bit Manipulation
2550 Count Collisions of Monkeys on a Polygon Math, Recursion
2554 Maximum Number of Integers to Choose From a Range I Array, Hash Table, Binary Search, Greedy, Sorting
2555 Maximize Win From Two Segments Array, Binary Search, Sliding Window
2556 Disconnect Path in a Binary Matrix by at Most One Flip Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Matrix
2559 Count Vowel Strings in Ranges Array, String, Prefix Sum
2560 House Robber IV Array, Binary Search, Dynamic Programming, Greedy
2563 Count the Number of Fair Pairs Array, Two Pointers, Binary Search, Sorting
2564 Substring XOR Queries Array, Hash Table, String, Bit Manipulation
2567 Minimum Score by Changing Two Elements Array, Greedy, Sorting
2568 Minimum Impossible OR Array, Bit Manipulation, Brainteaser
2571 Minimum Operations to Reduce an Integer to 0 Dynamic Programming, Greedy, Bit Manipulation
2572 Count the Number of Square-Free Subsets Array, Math, Dynamic Programming, Bit Manipulation, Bitmask
2575 Find the Divisibility Array of a String Array, Math, String
2576 Find the Maximum Number of Marked Indices Array, Two Pointers, Binary Search, Greedy, Sorting
2579 Count Total Number of Colored Cells Math
2580 Count Ways to Group Overlapping Ranges Array, Sorting
2583 Kth Largest Sum in a Binary Tree Tree, Breadth-First Search, Sorting, Binary Tree
2587 Rearrange Array to Maximize Prefix Score Array, Greedy, Sorting, Prefix Sum
2588 Count the Number of Beautiful Subarrays Array, Hash Table, Bit Manipulation, Prefix Sum
2592 Maximize Greatness of an Array Array, Two Pointers, Greedy, Sorting
2593 Find Score of an Array After Marking All Elements Array, Hash Table, Sorting, Heap (Priority Queue), Simulation
2594 Minimum Time to Repair Cars Array, Binary Search
2596 Check Knight Tour Configuration Array, Depth-First Search, Breadth-First Search, Matrix, Simulation
2597 The Number of Beautiful Subsets Array, Hash Table, Math, Dynamic Programming, Backtracking, Sorting, Combinatorics
2598 Smallest Missing Non-negative Integer After Operations Array, Hash Table, Math, Greedy
2601 Prime Subtraction Operation Array, Math, Binary Search, Greedy, Number Theory
2602 Minimum Operations to Make All Array Elements Equal Array, Binary Search, Sorting, Prefix Sum
2606 Find the Substring With Maximum Cost Array, Hash Table, String, Dynamic Programming
2607 Make K-Subarray Sums Equal Array, Math, Greedy, Sorting, Number Theory
2610 Convert an Array Into a 2D Array With Conditions Array, Hash Table
2611 Mice and Cheese Array, Greedy, Sorting, Heap (Priority Queue)
2615 Sum of Distances Array, Hash Table, Prefix Sum
2616 Minimize the Maximum Difference of Pairs Array, Binary Search, Dynamic Programming, Greedy, Sorting
2618 Check if Object Instance of Class -
2622 Cache With Time Limit -
2623 Memoize -
2624 Snail Traversal -
2625 Flatten Deeply Nested Array -
2627 Debounce -
2631 Group By -
2637 Promise Time Limit -
2640 Find the Score of All Prefixes of an Array Array, Prefix Sum
2641 Cousins in Binary Tree II Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree
2645 Minimum Additions to Make Valid String String, Dynamic Programming, Stack, Greedy
2649 Nested Array Generator -
2653 Sliding Subarray Beauty Array, Hash Table, Sliding Window
2654 Minimum Number of Operations to Make All Array Elements Equal to 1 Array, Math, Number Theory
2657 Find the Prefix Common Array of Two Arrays Array, Hash Table, Bit Manipulation
2658 Maximum Number of Fish in a Grid Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
2661 First Completely Painted Row or Column Array, Hash Table, Matrix
2662 Minimum Cost of a Path With Special Roads Array, Graph, Heap (Priority Queue), Shortest Path
2671 Frequency Tracker Hash Table, Design
2672 Number of Adjacent Elements With the Same Color Array
2673 Make Costs of Paths Equal in a Binary Tree Array, Dynamic Programming, Greedy, Tree, Binary Tree
2679 Sum in a Matrix Array, Sorting, Heap (Priority Queue), Matrix, Simulation
2680 Maximum OR Array, Greedy, Bit Manipulation, Prefix Sum
2683 Neighboring Bitwise XOR Array, Bit Manipulation
2684 Maximum Number of Moves in a Grid Array, Dynamic Programming, Matrix
2685 Count the Number of Complete Components Depth-First Search, Breadth-First Search, Union Find, Graph
2693 Call Function with Custom Context -
2694 Event Emitter -
2698 Find the Punishment Number of an Integer Math, Backtracking
2705 Compact Object -
2707 Extra Characters in a String Array, Hash Table, String, Dynamic Programming, Trie
2708 Maximum Strength of a Group Array, Dynamic Programming, Backtracking, Greedy, Bit Manipulation, Sorting, Enumeration
2711 Difference of Number of Distinct Values on Diagonals Array, Hash Table, Matrix
2712 Minimum Cost to Make All Characters Equal String, Dynamic Programming, Greedy
2718 Sum of Matrix After Queries Array, Hash Table
2721 Execute Asynchronous Functions in Parallel -
2722 Join Two Arrays by ID -
2730 Find the Longest Semi-Repetitive Substring String, Sliding Window
2731 Movement of Robots Array, Brainteaser, Sorting, Prefix Sum
2734 Lexicographically Smallest String After Substring Operation String, Greedy
2735 Collecting Chocolates Array, Enumeration
2740 Find the Value of the Partition Array, Sorting
2741 Special Permutations Array, Dynamic Programming, Bit Manipulation, Bitmask
2745 Construct the Longest New String Math, Dynamic Programming, Greedy, Brainteaser
2746 Decremental String Concatenation Array, String, Dynamic Programming
2747 Count Zero Request Servers Array, Hash Table, Sliding Window, Sorting
2749 Minimum Operations to Make the Integer Zero Bit Manipulation, Brainteaser, Enumeration
2750 Ways to Split Array Into Good Subarrays Array, Math, Dynamic Programming
2761 Prime Pairs With Target Sum Array, Math, Enumeration, Number Theory
2762 Continuous Subarrays Array, Queue, Sliding Window, Heap (Priority Queue), Ordered Set, Monotonic Queue
2766 Relocate Marbles Array, Hash Table, Sorting, Simulation
2767 Partition String Into Minimum Beautiful Substrings Hash Table, String, Dynamic Programming, Backtracking
2768 Number of Black Blocks Array, Hash Table, Enumeration
2770 Maximum Number of Jumps to Reach the Last Index Array, Dynamic Programming
2771 Longest Non-decreasing Subarray From Two Arrays Array, Dynamic Programming
2772 Apply Operations to Make All Array Elements Equal to Zero Array, Prefix Sum
2779 Maximum Beauty of an Array After Applying Operation Array, Binary Search, Sliding Window, Sorting
2780 Minimum Index of a Valid Split Array, Hash Table, Sorting
2785 Sort Vowels in a String String, Sorting
2786 Visit Array Positions to Maximize Score Array, Dynamic Programming
2787 Ways to Express an Integer as Sum of Powers Dynamic Programming
2789 Largest Element in an Array after Merge Operations Array, Greedy
2799 Count Complete Subarrays in an Array Array, Hash Table, Sliding Window
2800 Shortest String That Contains Three Strings String, Greedy, Enumeration
2807 Insert Greatest Common Divisors in Linked List Linked List, Math, Number Theory
2808 Minimum Seconds to Equalize a Circular Array Array, Hash Table
2811 Check if it is Possible to Split Array Array, Dynamic Programming, Greedy
2812 Find the Safest Path in a Grid Array, Binary Search, Breadth-First Search, Union Find, Heap (Priority Queue), Matrix
2816 Double a Number Represented as a Linked List Linked List, Math, Stack
2817 Minimum Absolute Difference Between Elements With Constraint Array, Binary Search, Ordered Set
2825 Make String a Subsequence Using Cyclic Increments Two Pointers, String
2826 Sorting Three Groups Array, Binary Search, Dynamic Programming
2829 Determine the Minimum Sum of a k-avoiding Array Math, Greedy
2830 Maximize the Profit as the Salesman Array, Hash Table, Binary Search, Dynamic Programming, Sorting
2831 Find the Longest Equal Subarray Array, Hash Table, Binary Search, Sliding Window
2834 Find the Minimum Possible Sum of a Beautiful Array Math, Greedy
2840 Check if Strings Can be Made Equal With Operations II Hash Table, String, Sorting
2841 Maximum Sum of Almost Unique Subarray Array, Hash Table, Sliding Window
2844 Minimum Operations to Make a Special Number Math, String, Greedy, Enumeration
2845 Count of Interesting Subarrays Array, Hash Table, Prefix Sum
2849 Determine if a Cell Is Reachable at a Given Time Math
2850 Minimum Moves to Spread Stones Over Grid Array, Dynamic Programming, Breadth-First Search, Matrix
2856 Minimum Array Length After Pair Removals Array, Hash Table, Two Pointers, Binary Search, Greedy, Counting
2857 Count Pairs of Points With Distance k Array, Hash Table, Bit Manipulation
2860 Happy Students Array, Sorting, Enumeration
2861 Maximum Number of Alloys Array, Binary Search
2865 Beautiful Towers I Array, Stack, Monotonic Stack
2866 Beautiful Towers II Array, Stack, Monotonic Stack
2870 Minimum Number of Operations to Make Array Empty Array, Hash Table, Greedy, Counting
2871 Split Array Into Maximum Number of Subarrays Array, Greedy, Bit Manipulation
2874 Maximum Value of an Ordered Triplet II Array
2875 Minimum Size Subarray in Infinite Array Array, Hash Table, Sliding Window, Prefix Sum
2895 Minimum Processing Time Array, Greedy, Sorting
2896 Apply Operations to Make Two Strings Equal String, Dynamic Programming
2901 Longest Unequal Adjacent Groups Subsequence II Array, String, Dynamic Programming
2904 Shortest and Lexicographically Smallest Beautiful String String, Sliding Window
2905 Find Indices With Index and Value Difference II Array, Two Pointers
2906 Construct Product Matrix Array, Matrix, Prefix Sum
2909 Minimum Sum of Mountain Triplets II Array
2910 Minimum Number of Groups to Create a Valid Assignment Array, Hash Table, Greedy
2914 Minimum Number of Changes to Make Binary String Beautiful String
2915 Length of the Longest Subsequence That Sums to Target Array, Dynamic Programming
2918 Minimum Equal Sum of Two Arrays After Replacing Zeros Array, Greedy
2919 Minimum Increment Operations to Make Array Beautiful Array, Dynamic Programming
2924 Find Champion II Graph
2925 Maximum Score After Applying Operations on a Tree Dynamic Programming, Tree, Depth-First Search
2929 Distribute Candies Among Children II Math, Combinatorics, Enumeration
2930 Number of Strings Which Can Be Rearranged to Contain Substring Math, Dynamic Programming, Combinatorics
2933 High-Access Employees Array, Hash Table, String, Sorting
2934 Minimum Operations to Maximize Last Elements in Arrays Array, Enumeration
2938 Separate Black and White Balls Two Pointers, String, Greedy
2939 Maximum Xor Product Math, Greedy, Bit Manipulation
2943 Maximize Area of Square Hole in Grid Array, Sorting
2944 Minimum Number of Coins for Fruits Array, Dynamic Programming, Queue, Heap (Priority Queue), Monotonic Queue
2947 Count Beautiful Substrings I Hash Table, Math, String, Enumeration, Number Theory, Prefix Sum
2948 Make Lexicographically Smallest Array by Swapping Elements Array, Union Find, Sorting
2952 Minimum Number of Coins to be Added Array, Greedy, Sorting
2957 Remove Adjacent Almost-Equal Characters String, Dynamic Programming, Greedy
2958 Length of Longest Subarray With at Most K Frequency Array, Hash Table, Sliding Window
2961 Double Modular Exponentiation Array, Math, Simulation
2962 Count Subarrays Where Max Element Appears at Least K Times Array, Sliding Window
2966 Divide Array Into Arrays With Max Difference Array, Greedy, Sorting
2967 Minimum Cost to Make Array Equalindromic Array, Math, Binary Search, Greedy, Sorting
2971 Find Polygon With the Largest Perimeter Array, Greedy, Sorting, Prefix Sum
2975 Maximum Square Area by Removing Fences From a Field Array, Hash Table, Enumeration
2976 Minimum Cost to Convert String I Array, String, Graph, Shortest Path
2981 Find Longest Special Substring That Occurs Thrice I Hash Table, String, Binary Search, Sliding Window, Counting
2982 Find Longest Special Substring That Occurs Thrice II Hash Table, String, Binary Search, Sliding Window, Counting
2997 Minimum Number of Operations to Make Array XOR Equal to K Array, Bit Manipulation
2998 Minimum Number of Operations to Make X and Y Equal Dynamic Programming, Breadth-First Search, Memoization
3001 Minimum Moves to Capture The Queen Math, Enumeration
3002 Maximum Size of a Set After Removals Array, Hash Table, Greedy
3006 Find Beautiful Indices in the Given Array I Two Pointers, String, Binary Search, Rolling Hash, String Matching, Hash Function
3007 Maximum Number That Sum of the Prices Is Less Than or Equal to K Binary Search, Dynamic Programming, Bit Manipulation
3011 Find if Array Can Be Sorted Array, Bit Manipulation, Sorting
3012 Minimize Length of Array Using Operations Array, Math, Greedy, Number Theory
3015 Count the Number of Houses at a Certain Distance I Breadth-First Search, Graph, Prefix Sum
3016 Minimum Number of Pushes to Type Word II Hash Table, String, Greedy, Sorting, Counting
3020 Find the Maximum Number of Elements in Subset Array, Hash Table, Enumeration
3021 Alice and Bob Playing Flower Game Math
3025 Find the Number of Ways to Place People I Array, Math, Geometry, Sorting, Enumeration
3026 Maximum Good Subarray Sum Array, Hash Table, Prefix Sum
3029 Minimum Time to Revert Word to Initial State I String, Rolling Hash, String Matching, Hash Function
3030 Find the Grid of Region Average Array, Matrix
3034 Number of Subarrays That Match a Pattern I Array, Rolling Hash, String Matching, Hash Function
3035 Maximum Palindromes After Operations Array, Hash Table, String, Greedy, Sorting, Counting
3039 Apply Operations to Make String Empty Array, Hash Table, Sorting, Counting
3040 Maximum Number of Operations With the Same Score II Array, Dynamic Programming, Memoization
3043 Find the Length of the Longest Common Prefix Array, Hash Table, String, Trie
3044 Most Frequent Prime Array, Hash Table, Math, Matrix, Counting, Enumeration, Number Theory
3047 Find the Largest Area of Square Inside Two Rectangles Array, Math, Geometry
3048 Earliest Second to Mark Indices I Array, Binary Search
3066 Minimum Operations to Exceed Threshold Value II Array, Heap (Priority Queue), Simulation
3067 Count Pairs of Connectable Servers in a Weighted Tree Network Array, Tree, Depth-First Search
3070 Count Submatrices with Top-Left Element and Sum Less Than k Array, Matrix, Prefix Sum
3071 Minimum Operations to Write the Letter Y on a Grid Array, Hash Table, Matrix, Counting
3075 Maximize Happiness of Selected Children Array, Greedy, Sorting
3076 Shortest Uncommon Substring in an Array Array, Hash Table, String, Trie
3080 Mark Elements on Array by Performing Queries Array, Hash Table, Sorting, Heap (Priority Queue), Simulation
3081 Replace Question Marks in String to Minimize Its Value Hash Table, String, Greedy, Sorting, Heap (Priority Queue), Counting
3084 Count Substrings Starting and Ending with Given Character Math, String, Counting
3085 Minimum Deletions to Make String K-Special Hash Table, String, Greedy, Sorting, Counting
3091 Apply Operations to Make Sum of Array Greater Than or Equal to k Math, Greedy, Enumeration
3092 Most Frequent IDs Array, Hash Table, Heap (Priority Queue), Ordered Set
3096 Minimum Levels to Gain More Points Array, Prefix Sum
3097 Shortest Subarray With OR at Least K II Array, Bit Manipulation, Sliding Window
3100 Water Bottles II Math, Simulation
3101 Count Alternating Subarrays Array, Math
3106 Lexicographically Smallest String After Operations With Constraint String, Greedy
3107 Minimum Operations to Make Median of Array Equal to K Array, Greedy, Sorting
3111 Minimum Rectangles to Cover Points Array, Greedy, Sorting
3112 Minimum Time to Visit Disappearing Nodes Array, Graph, Heap (Priority Queue), Shortest Path
3115 Maximum Prime Difference Array, Math, Number Theory
3121 Count the Number of Special Characters II Hash Table, String
3122 Minimum Number of Operations to Satisfy Conditions Array, Dynamic Programming, Matrix
3128 Right Triangles Array, Hash Table, Math, Combinatorics, Counting
3129 Find All Possible Stable Binary Arrays I Dynamic Programming, Prefix Sum
3132 Find the Integer Added to Array II Array, Two Pointers, Sorting, Enumeration
3133 Minimum Array End Bit Manipulation
3137 Minimum Number of Operations to Make Word K-Periodic Hash Table, String, Counting
3138 Minimum Length of Anagram Concatenation Hash Table, String, Counting
3143 Maximum Points Inside the Square Array, Hash Table, String, Binary Search, Sorting
3144 Minimum Substring Partition of Equal Character Frequency Hash Table, String, Dynamic Programming, Counting
3147 Taking Maximum Energy From the Mystic Dungeon Array, Prefix Sum
3148 Maximum Difference Score in a Grid Array, Dynamic Programming, Matrix
3152 Special Array II Array, Binary Search, Prefix Sum
3153 Sum of Digit Differences of All Pairs Array, Hash Table, Math, Counting
3159 Find Occurrences of an Element in an Array Array, Hash Table
3160 Find the Number of Distinct Colors Among the Balls Array, Hash Table, Simulation
3163 String Compression III String
3164 Find the Number of Good Pairs II Array, Hash Table
3169 Count Days Without Meetings Array, Sorting
3170 Lexicographically Minimum String After Removing Stars Hash Table, String, Stack, Greedy, Heap (Priority Queue)
3175 Find The First Player to win K Games in a Row Array, Simulation
3176 Find the Maximum Length of a Good Subsequence I Array, Hash Table, Dynamic Programming
3179 Find the N-th Value After K Seconds Array, Math, Simulation, Combinatorics, Prefix Sum
3180 Maximum Total Reward Using Operations I Array, Dynamic Programming
3185 Count Pairs That Form a Complete Day II Array, Hash Table, Counting
3186 Maximum Total Damage With Spell Casting Array, Hash Table, Two Pointers, Binary Search, Dynamic Programming, Sorting, Counting
3191 Minimum Operations to Make Binary Array Elements Equal to One I Array, Bit Manipulation, Queue, Sliding Window, Prefix Sum
3192 Minimum Operations to Make Binary Array Elements Equal to One II Array, Dynamic Programming, Greedy
3195 Find the Minimum Area to Cover All Ones I Array, Matrix
3196 Maximize Total Cost of Alternating Subarrays Array, Dynamic Programming
3201 Find the Maximum Length of Valid Subsequence I Array, Dynamic Programming
3202 Find the Maximum Length of Valid Subsequence II Array, Dynamic Programming
3207 Maximum Points After Enemy Battles Array, Greedy
3208 Alternating Groups II Array, Sliding Window
3211 Generate Binary Strings Without Adjacent Zeros String, Backtracking, Bit Manipulation
3212 Count Submatrices With Equal Frequency of X and Y Array, Matrix, Prefix Sum
3217 Delete Nodes From Linked List Present in Array Array, Hash Table, Linked List
3218 Minimum Cost for Cutting Cake I Array, Dynamic Programming, Greedy, Sorting
3220 Odd and Even Transactions Database
3223 Minimum Length of String After Operations Hash Table, String, Counting
3224 Minimum Array Changes to Make Differences Equal Array, Hash Table, Prefix Sum
3227 Vowels Game in a String Math, String, Brainteaser, Game Theory
3228 Maximum Number of Operations to Move Ones to the End String, Greedy, Counting
3233 Find the Count of Numbers Which Are Not Special Array, Math, Number Theory
3234 Count the Number of Substrings With Dominant Ones String, Sliding Window, Enumeration
3239 Minimum Number of Flips to Make Binary Grid Palindromic I Array, Two Pointers, Matrix
3240 Minimum Number of Flips to Make Binary Grid Palindromic II Array, Two Pointers, Matrix
3243 Shortest Distance After Road Addition Queries I Array, Breadth-First Search, Graph
3249 Count the Number of Good Nodes Tree, Depth-First Search
3254 Find the Power of K-Size Subarrays I Array, Sliding Window
3255 Find the Power of K-Size Subarrays II Array, Sliding Window
3259 Maximum Energy Boost From Two Drinks Array, Dynamic Programming
3265 Count Almost Equal Pairs I Array, Hash Table, Sorting, Counting, Enumeration
3271 Hash Divided String String, Simulation
3275 K-th Nearest Obstacle Queries Array, Heap (Priority Queue)
3281 Maximize Score of Numbers in Ranges Array, Binary Search, Greedy, Sorting
3282 Reach End of Array With Max Score Array, Greedy
3286 Find a Safe Walk Through a Grid Array, Breadth-First Search, Graph, Heap (Priority Queue), Matrix, Shortest Path
3290 Maximum Multiplication Score Array, Dynamic Programming
3291 Minimum Number of Valid Strings to Form Target I Array, String, Binary Search, Dynamic Programming, Trie, Segment Tree, Rolling Hash, String Matching, Hash Function
3295 Report Spam Message Array, Hash Table, String
3296 Minimum Number of Seconds to Make Mountain Height Zero Array, Math, Binary Search, Greedy, Heap (Priority Queue)
3297 Count Substrings That Can Be Rearranged to Contain a String I Hash Table, String, Sliding Window
3301 Maximize the Total Height of Unique Towers Array, Greedy, Sorting
3302 Find the Lexicographically Smallest Valid Sequence Two Pointers, String, Dynamic Programming, Greedy
3305 Count of Substrings Containing Every Vowel and K Consonants I Hash Table, String, Sliding Window
3306 Count of Substrings Containing Every Vowel and K Consonants II Hash Table, String, Sliding Window
3309 Maximum Possible Number by Binary Concatenation Array, Bit Manipulation, Enumeration
3310 Remove Methods From Project Depth-First Search, Breadth-First Search, Graph
3315 Construct the Minimum Bitwise Array II Array, Bit Manipulation
3316 Find Maximum Removals From Source String Array, Hash Table, Two Pointers, String, Dynamic Programming
3319 K-th Largest Perfect Subtree Size in Binary Tree Tree, Depth-First Search, Sorting, Binary Tree
3324 Find the Sequence of Strings Appeared on the Screen String, Simulation
3325 Count Substrings With K-Frequency Characters I Hash Table, String, Sliding Window
3326 Minimum Division Operations to Make Array Non Decreasing Array, Math, Greedy, Number Theory
3331 Find Subtree Sizes After Changes Array, Hash Table, String, Tree, Depth-First Search
3332 Maximum Points Tourist Can Earn Array, Dynamic Programming, Matrix
3334 Find the Maximum Factor Score of Array Array, Math, Number Theory
3335 Total Characters in String After Transformations I Hash Table, Math, String, Dynamic Programming, Counting
3341 Find Minimum Time to Reach Last Room I Array, Graph, Heap (Priority Queue), Matrix, Shortest Path
3342 Find Minimum Time to Reach Last Room II Array, Graph, Heap (Priority Queue), Matrix, Shortest Path
3346 Maximum Frequency of an Element After Performing Operations I Array, Binary Search, Sliding Window, Sorting, Prefix Sum
3350 Adjacent Increasing Subarrays Detection II Array, Binary Search
3355 Zero Array Transformation I Array, Prefix Sum
3356 Zero Array Transformation II Array, Binary Search, Prefix Sum
3361 Shift Distance Between Two Strings Array, String, Prefix Sum
3362 Zero Array Transformation III Array, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
3365 Rearrange K Substrings to Form Target String Hash Table, String, Sorting
3366 Minimum Array Sum Array, Dynamic Programming
3371 Identify the Largest Outlier in an Array Array, Hash Table, Counting, Enumeration
3372 Maximize the Number of Target Nodes After Connecting Trees I Tree, Depth-First Search, Breadth-First Search
3376 Minimum Time to Break Locks I Array, Dynamic Programming, Backtracking, Bit Manipulation, Depth-First Search, Bitmask
3377 Digit Operations to Make Two Integers Equal Math, Graph, Heap (Priority Queue), Number Theory, Shortest Path
3380 Maximum Area Rectangle With Point Constraints I Array, Math, Binary Indexed Tree, Segment Tree, Geometry, Sorting, Enumeration
3381 Maximum Subarray Sum With Length Divisible by K Array, Hash Table, Prefix Sum
3387 Maximize Amount After Two Days of Conversions Array, String, Depth-First Search, Breadth-First Search, Graph
3388 Count Beautiful Splits in an Array Array, Dynamic Programming
3393 Count Paths With the Given XOR Value Array, Dynamic Programming, Bit Manipulation, Matrix
3394 Check if Grid can be Cut into Sections Array, Sorting
3397 Maximum Number of Distinct Elements After Operations Array, Greedy, Sorting
3403 Find the Lexicographically Largest String From the Box I Two Pointers, String, Enumeration
3404 Count Special Subsequences Array, Hash Table, Math, Enumeration
3408 Design Task Manager Hash Table, Design, Heap (Priority Queue), Ordered Set
3409 Longest Subsequence With Decreasing Adjacent Difference Array, Dynamic Programming
3412 Find Mirror Score of a String Hash Table, String, Stack, Simulation
3413 Maximum Coins From K Consecutive Bags Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum
3418 Maximum Amount of Money Robot Can Earn Array, Dynamic Programming, Matrix
3419 Minimize the Maximum Edge Weight of Graph Binary Search, Depth-First Search, Breadth-First Search, Graph, Shortest Path
3421 Find Students Who Improved Database
3424 Minimum Cost to Make Arrays Identical Array, Greedy, Sorting
3428 Maximum and Minimum Sums of at Most Size K Subsequences Array, Math, Dynamic Programming, Sorting, Combinatorics
3429 Paint House IV Array, Dynamic Programming
3433 Count Mentions Per User Array, Math, Sorting, Simulation
3434 Maximum Frequency After Subarray Operation Array, Hash Table, Dynamic Programming, Greedy, Enumeration, Prefix Sum
3439 Reschedule Meetings for Maximum Free Time I Array, Greedy, Sliding Window
3440 Reschedule Meetings for Maximum Free Time II Array, Greedy, Enumeration
3443 Maximum Manhattan Distance After K Changes Hash Table, Math, String, Counting
3446 Sort Matrix by Diagonals Array, Sorting, Matrix
3447 Assign Elements to Groups with Constraints Array, Hash Table
3453 Separate Squares I Array, Binary Search
3457 Eat Pizzas! Array, Greedy, Sorting
3458 Select K Disjoint Special Substrings Hash Table, String, Dynamic Programming, Greedy, Sorting
3462 Maximum Sum With at Most K Elements Array, Greedy, Sorting, Heap (Priority Queue), Matrix
3468 Find the Number of Copy Arrays Array, Math
3469 Find Minimum Cost to Remove Array Elements Array, Dynamic Programming
3472 Longest Palindromic Subsequence After at Most K Operations String, Dynamic Programming
3473 Sum of K Subarrays With Length at Least M Array, Dynamic Programming, Prefix Sum
3475 DNA Pattern Recognition Database
3478 Choose K Elements With Maximum Sum Array, Sorting, Heap (Priority Queue)
3479 Fruits Into Baskets III Array, Binary Search, Segment Tree, Ordered Set
3484 Design Spreadsheet Array, Hash Table, String, Design, Matrix
3488 Closest Equal Element Queries Array, Hash Table, Binary Search
3489 Zero Array Transformation IV Array, Dynamic Programming
3493 Properties Graph Array, Hash Table, Depth-First Search, Breadth-First Search, Union Find, Graph
3494 Find the Minimum Amount of Time to Brew Potions Array, Simulation, Prefix Sum
3497 Analyze Subscription Conversion Database
3499 Maximize Active Section with Trade I String, Enumeration
3503 Longest Palindrome After Substring Concatenation I Two Pointers, String, Dynamic Programming, Enumeration
3508 Implement Router Array, Hash Table, Binary Search, Design, Queue, Ordered Set
3513 Number of Unique XOR Triplets I Array, Math, Bit Manipulation
3514 Number of Unique XOR Triplets II Array, Math, Bit Manipulation, Enumeration
3517 Smallest Palindromic Rearrangement I String, Sorting, Counting Sort
3521 Find Product Recommendation Pairs Database
3522 Calculate Score After Performing Instructions Array, Hash Table, String, Simulation
3523 Make Array Non-decreasing Array, Stack, Greedy, Monotonic Stack
3524 Find X Value of Array I Array, Math, Dynamic Programming
3527 Find the Most Common Response Array, Hash Table, String, Counting
3528 Unit Conversion I Depth-First Search, Breadth-First Search, Graph
3529 Count Cells in Overlapping Horizontal and Vertical Substrings Array, String, Rolling Hash, String Matching, Matrix, Hash Function
3531 Count Covered Buildings Array, Hash Table, Sorting
3532 Path Existence Queries in a Graph I Array, Hash Table, Binary Search, Union Find, Graph
3537 Fill a Special Grid Array, Divide and Conquer, Matrix
3542 Minimum Operations to Convert All Elements to Zero Array, Hash Table, Stack, Greedy, Monotonic Stack
3543 Maximum Weighted K-Edge Path Hash Table, Dynamic Programming, Graph
3546 Equal Sum Grid Partition I Array, Matrix, Enumeration, Prefix Sum
3551 Minimum Swaps to Sort by Digit Sum Array, Hash Table, Sorting
3552 Grid Teleportation Traversal Array, Hash Table, Breadth-First Search, Matrix
3556 Sum of Largest Prime Substrings Hash Table, Math, String, Sorting, Number Theory
3557 Find Maximum Number of Non Intersecting Substrings Hash Table, String, Dynamic Programming, Greedy
3558 Number of Ways to Assign Edge Weights I Math, Tree, Depth-First Search
3561 Resulting String After Adjacent Removals String, Stack, Simulation
3564 Seasonal Sales Analysis Database
3566 Partition Array into Two Equal Product Subsets Array, Bit Manipulation, Recursion, Enumeration
3567 Minimum Absolute Difference in Sliding Submatrix Array, Sorting, Matrix
3568 Minimum Moves to Clean the Classroom Array, Hash Table, Bit Manipulation, Breadth-First Search, Matrix
3572 Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values Array, Hash Table, Greedy, Sorting, Heap (Priority Queue)
3573 Best Time to Buy and Sell Stock V Array, Dynamic Programming
3576 Transform Array to All Equal Elements Array, Greedy
3577 Count the Number of Computer Unlocking Permutations Array, Math, Brainteaser, Combinatorics
3578 Count Partitions With Max-Min Difference at Most K Array, Dynamic Programming, Queue, Sliding Window, Prefix Sum, Monotonic Queue
3580 Find Consistently Improving Employees Database
3583 Count Special Triplets Array, Hash Table, Counting
3584 Maximum Product of First and Last Elements of a Subsequence Array, Two Pointers
3586 Find COVID Recovery Patients Database
3587 Minimum Adjacent Swaps to Alternate Parity Array, Greedy
3588 Find Maximum Area of a Triangle Array, Hash Table, Math, Greedy, Geometry, Enumeration
3589 Count Prime-Gap Balanced Subarrays Array, Math, Queue, Sliding Window, Number Theory, Monotonic Queue
3592 Inverse Coin Change Array, Dynamic Programming
3593 Minimum Increments to Equalize Leaf Paths Array, Dynamic Programming, Tree, Depth-First Search
3597 Partition String Hash Table, String, Trie, Simulation
3598 Longest Common Prefix Between Adjacent Strings After Removals Array, String
3599 Partition Array to Minimize XOR Array, Dynamic Programming, Bit Manipulation, Prefix Sum
3601 Find Drivers with Improved Fuel Efficiency Database
3603 Minimum Cost Path with Alternating Directions II Array, Dynamic Programming, Matrix
3604 Minimum Time to Reach Destination in Directed Graph Graph, Heap (Priority Queue), Shortest Path
3607 Power Grid Maintenance Array, Hash Table, Depth-First Search, Breadth-First Search, Union Find, Graph, Heap (Priority Queue), Ordered Set
3608 Minimum Time for K Connected Components Binary Search, Union Find, Graph, Sorting
3611 Find Overbooked Employees Database
3612 Process String with Special Operations I String, Simulation
3613 Minimize Maximum Component Cost Binary Search, Sort, Union Find, Graph
3618 Split Array by Prime Indices Array, Math, Number Theory
3619 Count Islands With Total Value Divisible by K Array, Depth-First Search, Breadth-First Search, Union Find, Matrix
3623 Count Number of Trapezoids I Array, Hash Table, Math, Geometry
3626 Find Stores with Inventory Imbalance -
3627 Maximum Median Sum of Subsequences of Size 3 -
3628 Maximum Number of Subsequences After One Inserting -
3629 Minimum Jumps to Reach End via Prime Teleportation -
3634 Minimum Removals to Balance Array -
3635 Earliest Finish Time for Land and Water Rides II -
3638 Maximum Balanced Shipments -
3639 Minimum Time to Activate String -