Press Control+F(or Command+F on the Mac) to search anything you want.
# | Solution | Tags | Difficulty | Remark |
---|---|---|---|---|
0001 | Two Sum | Array ,Hash Table |
Easy | |
0002 | Add Two Numbers | Recursion ,Linked List ,Math |
Medium | |
0003 | Longest Substring Without Repeating Characters | Hash Table ,String ,Sliding Window |
Medium | |
0004 | Median of Two Sorted Arrays | Array ,Binary Search ,Divide and Conquer |
Hard | |
0005 | Longest Palindromic Substring | String ,Dynamic Programming |
Medium | |
0006 | ZigZag Conversion | String |
Medium | |
0007 | Reverse Integer | Math |
Easy | |
0008 | String to Integer (atoi) | String |
Medium | |
0009 | Palindrome Number | Math |
Easy | |
0010 | Regular Expression Matching | Recursion ,String ,Dynamic Programming |
Hard | |
0011 | Container With Most Water | Greedy ,Array ,Two Pointers |
Medium | |
0012 | Integer to Roman | Hash Table ,Math ,String |
Medium | |
0013 | Roman to Integer | Hash Table ,Math ,String |
Easy | |
0014 | Longest Common Prefix | String |
Easy | |
0015 | 3Sum | Array ,Two Pointers ,Sorting |
Medium | |
0016 | 3Sum Closest | Array ,Two Pointers ,Sorting |
Medium | |
0017 | Letter Combinations of a Phone Number | Hash Table ,String ,Backtracking |
Medium | |
0018 | 4Sum | Array ,Two Pointers ,Sorting |
Medium | |
0019 | Remove Nth Node From End of List | Linked List ,Two Pointers |
Medium | |
0028 | Implement strStr() | Two Pointers ,String ,String Matching |
Easy | |
0039 | Combination Sum | Array ,Backtracking |
Medium | |
0040 | Combination Sum II | Array ,Backtracking |
Medium | |
0041 | First Missing Positive | Array ,Hash Table |
Hard | |
0042 | Trapping Rain Water | Stack ,Array ,Two Pointers ,Dynamic Programming ,Monotonic Stack |
Hard | |
0043 | Multiply Strings | Math ,String ,Simulation |
Medium | |
0044 | Wildcard Matching | Greedy ,Recursion ,String ,Dynamic Programming |
Hard | |
0045 | Jump Game II | Greedy ,Array ,Dynamic Programming |
Medium | |
0046 | Permutations | Array ,Backtracking |
Medium | |
0047 | Permutations II | Array ,Backtracking |
Medium | |
0048 | Rotate Image | Array ,Math ,Matrix |
Medium | |
0049 | Group Anagrams | Hash Table ,String ,Sorting |
Medium | |
0050 | Pow(x, n) | Recursion ,Math |
Medium | |
0051 | N-Queens | Array ,Backtracking |
Hard | |
0052 | N-Queens II | Backtracking |
Hard | |
0053 | Maximum Subarray | Array ,Divide and Conquer ,Dynamic Programming |
Easy | |
0054 | Spiral Matrix | Array ,Matrix ,Simulation |
Medium | |
0055 | Jump Game | Greedy ,Array ,Dynamic Programming |
Medium | |
0056 | Merge Intervals | Array ,Sorting |
Medium | |
0057 | Insert Interval | Array |
Medium | |
0058 | Length of Last Word | String |
Easy | |
0059 | Spiral Matrix II | Array ,Matrix ,Simulation |
Medium | |
0060 | Permutation Sequence | Recursion ,Math |
Hard | |
0061 | Rotate List | Linked List ,Two Pointers |
Medium | |
0062 | Unique Paths | Math ,Dynamic Programming ,Combinatorics |
Medium | |
0063 | Unique Paths II | Array ,Dynamic Programming ,Matrix |
Medium | |
0064 | Minimum Path Sum | Array ,Dynamic Programming ,Matrix |
Medium | |
0065 | Valid Number | String |
Hard | |
0066 | Plus One | Array ,Math |
Easy | |
0067 | Add Binary | Bit Manipulation ,Math ,String ,Simulation |
Easy | |
0068 | Text Justification | String ,Simulation |
Hard | |
0069 | Sqrt(x) | Math ,Binary Search |
Easy | |
0070 | Climbing Stairs | Memoization ,Math ,Dynamic Programming |
Easy | |
0084 | Largest Rectangle in Histogram | Stack ,Array ,Monotonic Stack |
Hard | |
0085 | Maximal Rectangle | Stack ,Array ,Dynamic Programming ,Matrix ,Monotonic Stack |
Hard | |
0086 | Partition List | Linked List ,Two Pointers |
Medium | |
0087 | Scramble String | String ,Dynamic Programming |
Hard | |
0088 | Merge Sorted Array | Array ,Two Pointers ,Sorting |
Easy | |
0089 | Gray Code | Bit Manipulation ,Math ,Backtracking |
Medium | |
0090 | Subsets II | Bit Manipulation ,Array ,Backtracking |
Medium | |
0091 | Decode Ways | String ,Dynamic Programming |
Medium | |
0092 | Reverse Linked List II | Linked List |
Medium | |
0093 | Restore IP Addresses | String ,Backtracking |
Medium | |
0094 | Binary Tree Inorder Traversal | Stack ,Tree ,Depth-First Search ,Binary Tree |
Easy | |
0095 | Unique Binary Search Trees II | Tree ,Binary Search Tree ,Dynamic Programming ,Backtracking ,Binary Tree |
Medium | |
0096 | Unique Binary Search Trees | Tree ,Binary Search Tree ,Math ,Dynamic Programming ,Binary Tree |
Medium | |
0097 | Interleaving String | String ,Dynamic Programming |
Medium | |
0098 | Validate Binary Search Tree | Tree ,Depth-First Search ,Binary Search Tree ,Binary Tree |
Medium | |
0099 | Recover Binary Search Tree | Tree ,Depth-First Search ,Binary Search Tree ,Binary Tree |
Medium | |
0100 | Same Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Easy | |
0101 | Symmetric Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Easy | |
0102 | Binary Tree Level Order Traversal | Tree ,Breadth-First Search ,Binary Tree |
Medium | |
0103 | Binary Tree Zigzag Level Order Traversal | Tree ,Breadth-First Search ,Binary Tree |
Medium | |
0104 | Maximum Depth of Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Easy | |
0105 | Construct Binary Tree from Preorder and Inorder Traversal | Tree ,Array ,Hash Table ,Divide and Conquer ,Binary Tree |
Medium | |
0106 | Construct Binary Tree from Inorder and Postorder Traversal | Tree ,Array ,Hash Table ,Divide and Conquer ,Binary Tree |
Medium | |
0107 | Binary Tree Level Order Traversal II | Tree ,Breadth-First Search ,Binary Tree |
Medium | |
0108 | Convert Sorted Array to Binary Search Tree | Tree ,Binary Search Tree ,Array ,Divide and Conquer ,Binary Tree |
Easy | |
0109 | Convert Sorted List to Binary Search Tree | Tree ,Binary Search Tree ,Linked List ,Divide and Conquer ,Binary Tree |
Medium | |
0110 | Balanced Binary Tree | Tree ,Depth-First Search ,Binary Tree |
Easy | |
0111 | Minimum Depth of Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Easy | |
0112 | Path Sum | Tree ,Depth-First Search ,Binary Tree |
Easy | |
0113 | Path Sum II | Tree ,Depth-First Search ,Backtracking ,Binary Tree |
Medium | |
0114 | Flatten Binary Tree to Linked List | Stack ,Tree ,Depth-First Search ,Linked List ,Binary Tree |
Medium | |
0115 | Distinct Subsequences | String ,Dynamic Programming |
Hard | |
0116 | Populating Next Right Pointers in Each Node | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0117 | Populating Next Right Pointers in Each Node II | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0118 | Pascal's Triangle | Array ,Dynamic Programming |
Easy | |
0119 | Pascal's Triangle II | Array ,Dynamic Programming |
Easy | |
0133 | Clone Graph | Depth-First Search ,Breadth-First Search ,Graph ,Hash Table |
Medium | |
0134 | Gas Station | Greedy ,Array |
Medium | |
0135 | Candy | Greedy ,Array |
Hard | |
0136 | Single Number | Bit Manipulation ,Array |
Easy | |
0137 | Single Number II | Bit Manipulation ,Array |
Medium | |
0138 | Copy List with Random Pointer | Hash Table ,Linked List |
Medium | |
0139 | Word Break | Trie ,Memoization ,Hash Table ,String ,Dynamic Programming |
Medium | |
0140 | Word Break II | Trie ,Memoization ,Hash Table ,String ,Dynamic Programming ,Backtracking |
Hard | |
0141 | Linked List Cycle | Hash Table ,Linked List ,Two Pointers |
Easy | |
0142 | Linked List Cycle II | Hash Table ,Linked List ,Two Pointers |
Medium | |
0143 | Reorder List | Stack ,Recursion ,Linked List ,Two Pointers |
Medium | |
0144 | Binary Tree Preorder Traversal | Stack ,Tree ,Depth-First Search ,Binary Tree |
Easy | |
0145 | Binary Tree Postorder Traversal | Stack ,Tree ,Depth-First Search ,Binary Tree |
Easy | |
0146 | LRU Cache | Design ,Hash Table ,Linked List ,Doubly-Linked List |
Medium | |
0147 | Insertion Sort List | Linked List ,Sorting |
Medium | |
0148 | Sort List | Linked List ,Two Pointers ,Divide and Conquer ,Sorting ,Merge Sort |
Medium | |
0149 | Max Points on a Line | Geometry ,Hash Table ,Math |
Hard | |
0150 | Evaluate Reverse Polish Notation | Stack ,Array ,Math |
Medium | |
0151 | Reverse Words in a String | Two Pointers ,String |
Medium | |
0152 | Maximum Product Subarray | Array ,Dynamic Programming |
Medium | |
0153 | Find Minimum in Rotated Sorted Array | Array ,Binary Search |
Medium | |
0154 | Find Minimum in Rotated Sorted Array II | Array ,Binary Search |
Hard | |
0155 | Min Stack | Stack ,Design |
Easy | |
0156 | Binary Tree Upside Down | Tree ,Depth-First Search ,Binary Tree |
Medium | 🔒 |
0157 | Read N Characters Given Read4 | String ,Interactive ,Simulation |
Easy | 🔒 |
0158 | Read N Characters Given Read4 II - Call multiple times | String ,Interactive ,Simulation |
Hard | 🔒 |
0159 | Longest Substring with At Most Two Distinct Characters | Hash Table ,String ,Sliding Window |
Medium | 🔒 |
0160 | Intersection of Two Linked Lists | Hash Table ,Linked List ,Two Pointers |
Easy | |
0161 | One Edit Distance | Two Pointers ,String |
Medium | 🔒 |
0162 | Find Peak Element | Array ,Binary Search |
Medium | |
0163 | Missing Ranges | Array |
Easy | 🔒 |
0164 | Maximum Gap | Array ,Bucket Sort ,Radix Sort ,Sorting |
Hard | |
0165 | Compare Version Numbers | Two Pointers ,String |
Medium | |
0166 | Fraction to Recurring Decimal | Hash Table ,Math ,String |
Medium | |
0167 | Two Sum II - Input array is sorted | Array ,Two Pointers ,Binary Search |
Easy | |
0168 | Excel Sheet Column Title | Math ,String |
Easy | |
0169 | Majority Element | Array ,Hash Table ,Divide and Conquer ,Counting ,Sorting |
Easy | |
0204 | Count Primes | Array ,Math ,Enumeration ,Number Theory |
Medium | |
0214 | Shortest Palindrome | String ,String Matching ,Hash Function ,Rolling Hash |
Hard | |
0222 | Count Complete Tree Nodes | Tree ,Depth-First Search ,Binary Search ,Binary Tree |
Medium | |
0232 | Implement Queue using Stacks | Stack ,Design ,Queue |
Easy | |
0240 | Search a 2D Matrix II | Array ,Binary Search ,Divide and Conquer ,Matrix |
Medium | |
0247 | Strobogrammatic Number II | Recursion ,Array ,String |
Medium | 🔒 |
0280 | Wiggle Sort | Greedy ,Array ,Sorting |
Medium | 🔒 |
0281 | Zigzag Iterator | Design ,Queue ,Array ,Iterator |
Medium | 🔒 |
0282 | Expression Add Operators | Math ,String ,Backtracking |
Hard | |
0283 | Move Zeroes | Array ,Two Pointers |
Easy | |
0284 | Peeking Iterator | Design ,Array ,Iterator |
Medium | |
0285 | Inorder Successor in BST | Tree ,Depth-First Search ,Binary Search Tree ,Binary Tree |
Medium | 🔒 |
0286 | Walls and Gates | Breadth-First Search ,Array ,Matrix |
Medium | 🔒 |
0287 | Find the Duplicate Number | Bit Manipulation ,Array ,Two Pointers ,Binary Search |
Medium | |
0288 | Unique Word Abbreviation | Design ,Array ,Hash Table ,String |
Medium | 🔒 |
0289 | Game of Life | Array ,Matrix ,Simulation |
Medium | |
0290 | Word Pattern | Hash Table ,String |
Easy | |
0291 | Word Pattern II | Hash Table ,String ,Backtracking |
Medium | 🔒 |
0292 | Nim Game | Brainteaser ,Math ,Game Theory |
Easy | |
0293 | Flip Game | String |
Easy | 🔒 |
0294 | Flip Game II | Memoization ,Math ,Dynamic Programming ,Backtracking ,Game Theory |
Medium | 🔒 |
0295 | Find Median from Data Stream | Design ,Two Pointers ,Data Stream ,Sorting ,Heap (Priority Queue) |
Hard | |
0296 | Best Meeting Point | Array ,Math ,Matrix ,Sorting |
Hard | 🔒 |
0297 | Serialize and Deserialize Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Design ,String ,Binary Tree |
Hard | |
0298 | Binary Tree Longest Consecutive Sequence | Tree ,Depth-First Search ,Binary Tree |
Medium | 🔒 |
0299 | Bulls and Cows | Hash Table ,String ,Counting |
Medium | |
0300 | Longest Increasing Subsequence | Array ,Binary Search ,Dynamic Programming |
Medium | |
0301 | Remove Invalid Parentheses | Breadth-First Search ,String ,Backtracking |
Hard | |
0302 | Smallest Rectangle Enclosing Black Pixels | Depth-First Search ,Breadth-First Search ,Array ,Binary Search ,Matrix |
Hard | 🔒 |
0303 | Range Sum Query - Immutable | Design ,Array ,Prefix Sum |
Easy | |
0304 | Range Sum Query 2D - Immutable | Design ,Array ,Matrix ,Prefix Sum |
Medium | |
0305 | Number of Islands II | Union Find ,Array |
Hard | 🔒 |
0306 | Additive Number | String ,Backtracking |
Medium | |
0307 | Range Sum Query - Mutable | Design ,Binary Indexed Tree ,Segment Tree ,Array |
Medium | |
0308 | Range Sum Query 2D - Mutable | Design ,Binary Indexed Tree ,Segment Tree ,Array ,Matrix |
Hard | 🔒 |
0309 | Best Time to Buy and Sell Stock with Cooldown | Array ,Dynamic Programming |
Medium | |
0310 | Minimum Height Trees | Depth-First Search ,Breadth-First Search ,Graph ,Topological Sort |
Medium | |
0311 | Sparse Matrix Multiplication | Array ,Hash Table ,Matrix |
Medium | 🔒 |
0312 | Burst Balloons | Array ,Dynamic Programming |
Hard | |
0313 | Super Ugly Number | Array ,Hash Table ,Math ,Dynamic Programming ,Heap (Priority Queue) |
Medium | |
0314 | Binary Tree Vertical Order Traversal | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table ,Binary Tree |
Medium | 🔒 |
0315 | Count of Smaller Numbers After Self | Binary Indexed Tree ,Segment Tree ,Array ,Binary Search ,Divide and Conquer ,Ordered Set ,Merge Sort |
Hard | |
0316 | Remove Duplicate Letters | Stack ,Greedy ,String ,Monotonic Stack |
Medium | |
0317 | Shortest Distance from All Buildings | Breadth-First Search ,Array ,Matrix |
Hard | 🔒 |
0318 | Maximum Product of Word Lengths | Bit Manipulation ,Array ,String |
Medium | |
0319 | Bulb Switcher | Brainteaser ,Math |
Medium | |
0320 | Generalized Abbreviation | Bit Manipulation ,String ,Backtracking |
Medium | 🔒 |
0330 | Patching Array | Greedy ,Array |
Hard | |
0414 | Third Maximum Number | Array ,Sorting |
Easy | |
0427 | Construct Quad Tree | Tree ,Array ,Divide and Conquer ,Matrix |
Medium | |
0428 | Serialize and Deserialize N-ary Tree | Tree ,Depth-First Search ,Breadth-First Search ,String |
Hard | 🔒 |
0429 | N-ary Tree Level Order Traversal | Tree ,Breadth-First Search |
Medium | |
0430 | Flatten a Multilevel Doubly Linked List | Depth-First Search ,Linked List ,Doubly-Linked List |
Medium | |
0431 | Encode N-ary Tree to Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Design ,Binary Tree |
Hard | 🔒 |
0441 | Arranging Coins | Math ,Binary Search |
Easy | |
0464 | Can I Win | Bit Manipulation ,Memoization ,Math ,Dynamic Programming ,Bitmask ,Game Theory |
Medium | |
0467 | Unique Substrings in Wraparound String | String ,Dynamic Programming |
Medium | |
0468 | Validate IP Address | String |
Medium | |
0469 | Convex Polygon | Geometry ,Math |
Medium | 🔒 |
0470 | Implement Rand10() Using Rand7() | Math ,Rejection Sampling ,Probability and Statistics ,Randomized |
Medium | |
0471 | Encode String with Shortest Length | String ,Dynamic Programming |
Hard | 🔒 |
0472 | Concatenated Words | Depth-First Search ,Trie ,String ,Dynamic Programming |
Hard | |
0473 | Matchsticks to Square | Bit Manipulation ,Array ,Dynamic Programming ,Backtracking ,Bitmask |
Medium | |
0474 | Ones and Zeroes | Array ,String ,Dynamic Programming |
Medium | |
0475 | Heaters | Array ,Binary Search ,Sorting |
Medium | |
0476 | Number Complement | Bit Manipulation |
Easy | |
0492 | Construct the Rectangle | Math |
Easy | |
0493 | Reverse Pairs | Binary Indexed Tree ,Segment Tree ,Array ,Binary Search ,Divide and Conquer ,Ordered Set ,Merge Sort |
Hard | |
0494 | Target Sum | Array ,Dynamic Programming ,Backtracking |
Medium | |
0495 | Teemo Attacking | Array ,Simulation |
Easy | |
0496 | Next Greater Element I | Stack ,Array ,Hash Table ,Monotonic Stack |
Easy | |
0498 | Diagonal Traverse | Array ,Matrix ,Simulation |
Medium | |
0499 | The Maze III | Depth-First Search ,Breadth-First Search ,Graph ,Shortest Path ,Heap (Priority Queue) |
Hard | 🔒 |
0500 | Keyboard Row | Array ,Hash Table ,String |
Easy | |
0501 | Find Mode in Binary Search Tree | Tree ,Depth-First Search ,Binary Search Tree ,Binary Tree |
Easy | |
0502 | IPO | Greedy ,Array ,Sorting ,Heap (Priority Queue) |
Hard | |
0503 | Next Greater Element II | Stack ,Array ,Monotonic Stack |
Medium | |
0504 | Base 7 | Math |
Easy | |
0505 | The Maze II | Depth-First Search ,Breadth-First Search ,Graph ,Shortest Path ,Heap (Priority Queue) |
Medium | 🔒 |
0506 | Relative Ranks | Array ,Sorting ,Heap (Priority Queue) |
Easy | |
0507 | Perfect Number | Math |
Easy | |
0508 | Most Frequent Subtree Sum | Tree ,Depth-First Search ,Hash Table ,Binary Tree |
Medium | |
0509 | Fibonacci Number | Recursion ,Memoization ,Math ,Dynamic Programming |
Easy | |
0510 | Inorder Successor in BST II | Tree ,Binary Search Tree ,Binary Tree |
Medium | 🔒 |
0511 | Game Play Analysis I | Database |
Easy | 🔒 |
0513 | Find Bottom Left Tree Value | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0514 | Freedom Trail | Depth-First Search ,Breadth-First Search ,String ,Dynamic Programming |
Hard | |
0515 | Find Largest Value in Each Tree Row | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0516 | Longest Palindromic Subsequence | String ,Dynamic Programming |
Medium | |
0517 | Super Washing Machines | Greedy ,Array |
Hard | |
0518 | Coin Change 2 | Array ,Dynamic Programming |
Medium | |
0520 | Detect Capital | String |
Easy | |
0521 | Longest Uncommon Subsequence I | String |
Easy | |
0522 | Longest Uncommon Subsequence II | Array ,Hash Table ,Two Pointers ,String ,Sorting |
Medium | |
0523 | Continuous Subarray Sum | Array ,Hash Table ,Math ,Prefix Sum |
Medium | |
0524 | Longest Word in Dictionary through Deleting | Array ,Two Pointers ,String ,Sorting |
Medium | |
0525 | Contiguous Array | Array ,Hash Table ,Prefix Sum |
Medium | |
0526 | Beautiful Arrangement | Bit Manipulation ,Array ,Dynamic Programming ,Backtracking ,Bitmask |
Medium | |
0527 | Word Abbreviation | Greedy ,Trie ,Array ,String ,Sorting |
Hard | 🔒 |
0529 | Minesweeper | Depth-First Search ,Breadth-First Search ,Array ,Matrix |
Medium | |
0530 | Minimum Absolute Difference in BST | Tree ,Depth-First Search ,Breadth-First Search ,Binary Search Tree ,Binary Tree |
Easy | |
0558 | Logical OR of Two Binary Grids Represented as Quad-Trees | Tree ,Divide and Conquer |
Medium | |
0559 | Maximum Depth of N-ary Tree | Tree ,Depth-First Search ,Breadth-First Search |
Easy | |
0563 | Binary Tree Tilt | Tree ,Depth-First Search ,Binary Tree |
Easy | |
0564 | Find the Closest Palindrome | Math ,String |
Hard | |
0565 | Array Nesting | Depth-First Search ,Array |
Medium | |
0566 | Reshape the Matrix | Array ,Matrix ,Simulation |
Easy | |
0567 | Permutation in String | Hash Table ,Two Pointers ,String ,Sliding Window |
Medium | |
0568 | Maximum Vacation Days | Array ,Dynamic Programming ,Matrix |
Hard | 🔒 |
0569 | Median Employee Salary | Database |
Hard | 🔒 |
0570 | Managers with at Least 5 Direct Reports | Database |
Medium | 🔒 |
0571 | Find Median Given Frequency of Numbers | Database |
Hard | 🔒 |
0572 | Subtree of Another Tree | Tree ,Depth-First Search ,Binary Tree ,String Matching ,Hash Function |
Easy | |
0573 | Squirrel Simulation | Array ,Math |
Medium | 🔒 |
0574 | Winning Candidate | Database |
Medium | 🔒 |
0575 | Distribute Candies | Array ,Hash Table |
Easy | |
0576 | Out of Boundary Paths | Dynamic Programming |
Medium | |
0577 | Employee Bonus | Database |
Easy | 🔒 |
0578 | Get Highest Answer Rate Question | Database |
Medium | 🔒 |
0579 | Find Cumulative Salary of an Employee | Database |
Hard | 🔒 |
0580 | Count Student Number in Departments | Database |
Medium | 🔒 |
0581 | Shortest Unsorted Continuous Subarray | Stack ,Greedy ,Array ,Two Pointers ,Sorting ,Monotonic Stack |
Medium | |
0582 | Kill Process | Tree ,Depth-First Search ,Breadth-First Search ,Array ,Hash Table |
Medium | 🔒 |
0583 | Delete Operation for Two Strings | String ,Dynamic Programming |
Medium | |
0588 | Design In-Memory File System | Design ,Trie ,Hash Table ,String |
Hard | 🔒 |
0589 | N-ary Tree Preorder Traversal | Stack ,Tree ,Depth-First Search |
Easy | |
0590 | N-ary Tree Postorder Traversal | Stack ,Tree ,Depth-First Search |
Easy | |
0599 | Minimum Index Sum of Two Lists | Array ,Hash Table ,String |
Easy | |
0600 | Non-negative Integers without Consecutive Ones | Dynamic Programming |
Hard | |
0601 | Human Traffic of Stadium | Database |
Hard | |
0602 | Friend Requests II Who Has the Most Friends | Database |
Medium | 🔒 |
0603 | Consecutive Available Seats | Database |
Easy | 🔒 |
0604 | Design Compressed String Iterator | Design ,Array ,Hash Table ,String ,Iterator |
Easy | 🔒 |
0605 | Can Place Flowers | Greedy ,Array |
Easy | |
0606 | Construct String from Binary Tree | Tree ,Depth-First Search ,String ,Binary Tree |
Easy | |
0607 | Sales Person | Database |
Easy | 🔒 |
0608 | Tree Node | Database |
Medium | 🔒 |
0609 | Find Duplicate File in System | Array ,Hash Table ,String |
Medium | |
0610 | Triangle Judgement | Database |
Easy | 🔒 |
0611 | Valid Triangle Number | Greedy ,Array ,Two Pointers ,Binary Search ,Sorting |
Medium | |
0612 | Shortest Distance in a Plane | Database |
Medium | 🔒 |
0613 | Shortest Distance in a Line | Database |
Easy | 🔒 |
0614 | Second Degree Follower | Database |
Medium | 🔒 |
0615 | Average Salary Departments VS Company | Database |
Hard | 🔒 |
0616 | Add Bold Tag in String | Trie ,Array ,Hash Table ,String ,String Matching |
Medium | 🔒 |
0617 | Merge Two Binary Trees | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Easy | |
0618 | Students Report By Geography | Database |
Hard | 🔒 |
0619 | Biggest Single Number | Database |
Easy | 🔒 |
0620 | Not Boring Movies | Database |
Easy | |
0621 | Task Scheduler | Greedy ,Array ,Hash Table ,Counting ,Sorting ,Heap (Priority Queue) |
Medium | |
0623 | Add One Row to Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0624 | Maximum Distance in Arrays | Greedy ,Array |
Medium | 🔒 |
0625 | Minimum Factorization | Greedy ,Math |
Medium | 🔒 |
0626 | Exchange Seats | Database |
Medium | |
0627 | Swap Salary | Database |
Easy | |
0628 | Maximum Product of Three Numbers | Array ,Math ,Sorting |
Easy | |
0629 | K Inverse Pairs Array | Dynamic Programming |
Hard | |
0630 | Course Schedule III | Greedy ,Array ,Heap (Priority Queue) |
Hard | |
0631 | Design Excel Sum Formula | Graph ,Design ,Topological Sort |
Hard | 🔒 |
0632 | Smallest Range Covering Elements from K Lists | Greedy ,Array ,Hash Table ,Sorting ,Sliding Window ,Heap (Priority Queue) |
Hard | |
0633 | Sum of Square Numbers | Math ,Two Pointers ,Binary Search |
Medium | |
0634 | Find the Derangement of An Array | Math ,Dynamic Programming |
Medium | 🔒 |
0635 | Design Log Storage System | Design ,Hash Table ,String ,Ordered Set |
Medium | 🔒 |
0636 | Exclusive Time of Functions | Stack ,Array |
Medium | |
0637 | Average of Levels in Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Easy | |
0638 | Shopping Offers | Bit Manipulation ,Memoization ,Array ,Dynamic Programming ,Backtracking ,Bitmask |
Medium | |
0639 | Decode Ways II | String ,Dynamic Programming |
Hard | |
0640 | Solve the Equation | Math ,String ,Simulation |
Medium | |
0642 | Design Search Autocomplete System | Design ,Trie ,String ,Data Stream |
Hard | 🔒 |
0643 | Maximum Average Subarray I | Array ,Sliding Window |
Easy | |
0644 | Maximum Average Subarray II | Array ,Binary Search |
Hard | 🔒 |
0645 | Set Mismatch | Bit Manipulation ,Array ,Hash Table ,Sorting |
Easy | |
0646 | Maximum Length of Pair Chain | Greedy ,Array ,Dynamic Programming ,Sorting |
Medium | |
0647 | Palindromic Substrings | String ,Dynamic Programming |
Medium | |
0648 | Replace Words | Trie ,Array ,Hash Table ,String |
Medium | |
0649 | Dota2 Senate | Greedy ,Queue ,String |
Medium | |
0650 | 2 Keys Keyboard | Math ,Dynamic Programming |
Medium | |
0651 | 4 Keys Keyboard | Math ,Dynamic Programming |
Medium | 🔒 |
0652 | Find Duplicate Subtrees | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0653 | Two Sum IV - Input is a BST | Tree ,Depth-First Search ,Breadth-First Search ,Binary Search Tree ,Hash Table ,Two Pointers ,Binary Tree |
Easy | |
0654 | Maximum Binary Tree | Stack ,Tree ,Array ,Divide and Conquer ,Binary Tree ,Monotonic Stack |
Medium | |
0655 | Print Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0656 | Coin Path | Array ,Dynamic Programming |
Hard | 🔒 |
0657 | Robot Return to Origin | String ,Simulation |
Easy | |
0658 | Find K Closest Elements | Array ,Two Pointers ,Binary Search ,Sorting ,Heap (Priority Queue) |
Medium | |
0659 | Split Array into Consecutive Subsequences | Greedy ,Array ,Hash Table ,Heap (Priority Queue) |
Medium | |
0660 | Remove 9 | Math |
Hard | 🔒 |
0661 | Image Smoother | Array ,Matrix |
Easy | |
0662 | Maximum Width of Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0663 | Equal Tree Partition | Tree ,Depth-First Search ,Binary Tree |
Medium | 🔒 |
0664 | Strange Printer | String ,Dynamic Programming |
Hard | |
0665 | Non-decreasing Array | Array |
Medium | |
0666 | Path Sum IV | Tree ,Depth-First Search ,Array ,Binary Tree |
Medium | 🔒 |
0667 | Beautiful Arrangement II | Array ,Math |
Medium | |
0668 | Kth Smallest Number in Multiplication Table | Binary Search |
Hard | |
0669 | Trim a Binary Search Tree | Tree ,Depth-First Search ,Binary Search Tree ,Binary Tree |
Medium | |
0670 | Maximum Swap | Greedy ,Math |
Medium | |
0671 | Second Minimum Node In a Binary Tree | Tree ,Depth-First Search ,Binary Tree |
Easy | |
0672 | Bulb Switcher II | Bit Manipulation ,Depth-First Search ,Breadth-First Search ,Math |
Medium | |
0673 | Number of Longest Increasing Subsequence | Binary Indexed Tree ,Segment Tree ,Array ,Dynamic Programming |
Medium | |
0674 | Longest Continuous Increasing Subsequence | Array |
Easy | |
0675 | Cut Off Trees for Golf Event | Breadth-First Search ,Array ,Matrix ,Heap (Priority Queue) |
Hard | |
0676 | Implement Magic Dictionary | Design ,Trie ,Hash Table ,String |
Medium | |
0677 | Map Sum Pairs | Design ,Trie ,Hash Table ,String |
Medium | |
0678 | Valid Parenthesis String | Stack ,Greedy ,String ,Dynamic Programming |
Medium | |
0679 | 24 Game | Array ,Math ,Backtracking |
Hard | |
0680 | Valid Palindrome II | Greedy ,Two Pointers ,String |
Easy | |
0681 | Next Closest Time | String ,Enumeration |
Medium | 🔒 |
0682 | Baseball Game | Stack ,Array ,Simulation |
Easy | |
0683 | K Empty Slots | Binary Indexed Tree ,Array ,Ordered Set ,Sliding Window |
Hard | 🔒 |
0684 | Redundant Connection | Depth-First Search ,Breadth-First Search ,Union Find ,Graph |
Medium | |
0685 | Redundant Connection II | Depth-First Search ,Breadth-First Search ,Union Find ,Graph |
Hard | |
0686 | Repeated String Match | String ,String Matching |
Medium | |
0687 | Longest Univalue Path | Tree ,Depth-First Search ,Binary Tree |
Medium | |
0700 | Search in a Binary Search Tree | Tree ,Binary Search Tree ,Binary Tree |
Easy | |
0701 | Insert into a Binary Search Tree | Tree ,Binary Search Tree ,Binary Tree |
Medium | |
0702 | Search in a Sorted Array of Unknown Size | Array ,Binary Search ,Interactive |
Medium | 🔒 |
0703 | Kth Largest Element in a Stream | Tree ,Design ,Binary Search Tree ,Binary Tree ,Data Stream ,Heap (Priority Queue) |
Easy | |
0704 | Binary Search | Array ,Binary Search |
Easy | |
0709 | To Lower Case | String |
Easy | |
0710 | Random Pick with Blacklist | Hash Table ,Math ,Binary Search ,Sorting ,Randomized |
Hard | |
0713 | Subarray Product Less Than K | Array ,Sliding Window |
Medium | |
0714 | Best Time to Buy and Sell Stock with Transaction Fee | Greedy ,Array ,Dynamic Programming |
Medium | |
0715 | Range Module | Design ,Segment Tree ,Ordered Set |
Hard | |
0716 | Max Stack | Stack ,Design ,Linked List ,Doubly-Linked List ,Ordered Set |
Easy | 🔒 |
0717 | 1-bit and 2-bit Characters | Array |
Easy | |
0718 | Maximum Length of Repeated Subarray | Array ,Binary Search ,Dynamic Programming ,Sliding Window ,Hash Function ,Rolling Hash |
Medium | |
0719 | Find K-th Smallest Pair Distance | Array ,Two Pointers ,Binary Search ,Sorting |
Hard | |
0720 | Longest Word in Dictionary | Trie ,Array ,Hash Table ,String ,Sorting |
Easy | |
0721 | Accounts Merge | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,String |
Medium | |
0722 | Remove Comments | Array ,String |
Medium | |
0723 | Candy Crush | Array ,Two Pointers ,Matrix ,Simulation |
Medium | 🔒 |
0724 | Find Pivot Index | Array ,Prefix Sum |
Easy | |
0725 | Split Linked List in Parts | Linked List |
Medium | |
0726 | Number of Atoms | Stack ,Hash Table ,String |
Hard | |
0727 | Minimum Window Subsequence | String ,Dynamic Programming ,Sliding Window |
Hard | 🔒 |
0728 | Self Dividing Numbers | Math |
Easy | |
0729 | My Calendar I | Design ,Segment Tree ,Ordered Set |
Medium | |
0730 | Count Different Palindromic Subsequences | String ,Dynamic Programming |
Hard | |
0731 | My Calendar II | Design ,Segment Tree ,Ordered Set |
Medium | |
0732 | My Calendar III | Design ,Segment Tree ,Ordered Set |
Hard | |
0733 | Flood Fill | Depth-First Search ,Breadth-First Search ,Array ,Matrix |
Easy | |
0734 | Sentence Similarity | Array ,Hash Table ,String |
Easy | 🔒 |
0735 | Asteroid Collision | Stack ,Array |
Medium | |
0736 | Parse Lisp Expression | Stack ,Recursion ,Hash Table ,String |
Hard | |
0737 | Sentence Similarity II | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Hash Table ,String |
Medium | 🔒 |
0738 | Monotone Increasing Digits | Greedy ,Math |
Medium | |
0739 | Daily Temperatures | Stack ,Array ,Monotonic Stack |
Medium | |
0740 | Delete and Earn | Array ,Hash Table ,Dynamic Programming |
Medium | |
0741 | Cherry Pickup | Array ,Dynamic Programming ,Matrix |
Hard | |
0742 | Closest Leaf in a Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | 🔒 |
0743 | Network Delay Time | Depth-First Search ,Breadth-First Search ,Graph ,Shortest Path ,Heap (Priority Queue) |
Medium | |
0744 | Find Smallest Letter Greater Than Target | Array ,Binary Search |
Easy | |
0745 | Prefix and Suffix Search | Design ,Trie ,String |
Hard | |
0746 | Min Cost Climbing Stairs | Array ,Dynamic Programming |
Easy | |
0747 | Largest Number At Least Twice of Others | Array ,Sorting |
Easy | |
0761 | Special Binary String | Recursion ,String |
Hard | |
0762 | Prime Number of Set Bits in Binary Representation | Bit Manipulation ,Math |
Easy | |
0763 | Partition Labels | Greedy ,Hash Table ,Two Pointers ,String |
Medium | |
0764 | Largest Plus Sign | Array ,Dynamic Programming |
Medium | |
0765 | Couples Holding Hands | Greedy ,Depth-First Search ,Breadth-First Search ,Union Find ,Graph |
Hard | |
0766 | Toeplitz Matrix | Array ,Matrix |
Easy | |
0767 | Reorganize String | Greedy ,Hash Table ,String ,Counting ,Sorting ,Heap (Priority Queue) |
Medium | |
0768 | Max Chunks To Make Sorted II | Stack ,Greedy ,Array ,Sorting ,Monotonic Stack |
Hard | |
0769 | Max Chunks To Make Sorted | Stack ,Greedy ,Array ,Sorting ,Monotonic Stack |
Medium | |
0770 | Basic Calculator IV | Stack ,Recursion ,Hash Table ,Math ,String |
Hard | |
0771 | Jewels and Stones | Hash Table ,String |
Easy | |
0772 | Basic Calculator III | Stack ,Recursion ,Math ,String |
Hard | 🔒 |
0773 | Sliding Puzzle | Breadth-First Search ,Array ,Matrix |
Hard | |
0774 | Minimize Max Distance to Gas Station | Array ,Binary Search |
Hard | 🔒 |
0775 | Global and Local Inversions | Array ,Math |
Medium | |
0776 | Split BST | Tree ,Binary Search Tree ,Recursion ,Binary Tree |
Medium | 🔒 |
0777 | Swap Adjacent in LR String | Two Pointers ,String |
Medium | |
0778 | Swim in Rising Water | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Binary Search ,Matrix ,Heap (Priority Queue) |
Hard | |
0779 | K-th Symbol in Grammar | Bit Manipulation ,Recursion ,Math |
Medium | |
0780 | Reaching Points | Math |
Hard | |
0781 | Rabbits in Forest | Greedy ,Hash Table ,Math |
Medium | |
0782 | Transform to Chessboard | Bit Manipulation ,Array ,Math ,Matrix |
Hard | |
0789 | Escape The Ghosts | Array ,Math |
Medium | |
0842 | Split Array into Fibonacci Sequence | String ,Backtracking |
Medium | |
0852 | Peak Index in a Mountain Array | Array ,Binary Search |
Easy | |
0860 | Lemonade Change | Greedy ,Array |
Easy | |
0861 | Score After Flipping Matrix | Greedy ,Bit Manipulation ,Array ,Matrix |
Medium | |
0862 | Shortest Subarray with Sum at Least K | Queue ,Array ,Binary Search ,Prefix Sum ,Sliding Window ,Monotonic Queue ,Heap (Priority Queue) |
Hard | |
0863 | All Nodes Distance K in Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
0864 | Shortest Path to Get All Keys | Bit Manipulation ,Breadth-First Search |
Hard | |
0865 | Smallest Subtree with all the Deepest Nodes | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table ,Binary Tree |
Medium | |
0866 | Prime Palindrome | Math |
Medium | |
0867 | Transpose Matrix | Array ,Matrix ,Simulation |
Easy | |
0868 | Binary Gap | Bit Manipulation ,Math |
Easy | |
0869 | Reordered Power of 2 | Math ,Counting ,Enumeration ,Sorting |
Medium | |
0870 | Advantage Shuffle | Greedy ,Array ,Sorting |
Medium | |
0871 | Minimum Number of Refueling Stops | Greedy ,Array ,Dynamic Programming ,Heap (Priority Queue) |
Hard | |
0872 | Leaf-Similar Trees | Tree ,Depth-First Search ,Binary Tree |
Easy | |
0873 | Length of Longest Fibonacci Subsequence | Array ,Hash Table ,Dynamic Programming |
Medium | |
0874 | Walking Robot Simulation | Array ,Simulation |
Medium | |
0882 | Reachable Nodes In Subdivided Graph | Graph ,Shortest Path ,Heap (Priority Queue) |
Hard | |
0894 | All Possible Full Binary Trees | Tree ,Recursion ,Memoization ,Dynamic Programming ,Binary Tree |
Medium | |
0906 | Super Palindromes | Math ,Enumeration |
Hard | |
0910 | Smallest Range II | Greedy ,Array ,Math ,Sorting |
Medium | |
0911 | Online Election | Design ,Array ,Hash Table ,Binary Search |
Medium | |
0912 | Sort an Array | Array ,Divide and Conquer ,Bucket Sort ,Counting Sort ,Radix Sort ,Sorting ,Heap (Priority Queue) ,Merge Sort |
Medium | |
0913 | Cat and Mouse | Breadth-First Search ,Graph ,Memoization ,Math ,Dynamic Programming ,Game Theory |
Hard | |
0914 | X of a Kind in a Deck of Cards | Array ,Hash Table ,Math ,Counting ,Number Theory |
Easy | |
0915 | Partition Array into Disjoint Intervals | Array |
Medium | |
0916 | Word Subsets | Array ,Hash Table ,String |
Medium | |
0917 | Reverse Only Letters | Two Pointers ,String |
Easy | |
0918 | Maximum Sum Circular Subarray | Queue ,Array ,Divide and Conquer ,Dynamic Programming ,Monotonic Queue |
Medium | |
0919 | Complete Binary Tree Inserter | Tree ,Breadth-First Search ,Design ,Binary Tree |
Medium | |
0923 | 3Sum With Multiplicity | Array ,Hash Table ,Two Pointers ,Counting ,Sorting |
Medium | |
0924 | Minimize Malware Spread | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Matrix |
Hard | |
0925 | Long Pressed Name | Two Pointers ,String |
Easy | |
0926 | Flip String to Monotone Increasing | String ,Dynamic Programming |
Medium | |
0927 | Three Equal Parts | Array ,Math |
Hard | |
0928 | Minimize Malware Spread II | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Matrix |
Hard | |
0929 | Unique Email Addresses | Array ,Hash Table ,String |
Easy | |
0930 | Binary Subarrays With Sum | Array ,Hash Table ,Prefix Sum ,Sliding Window |
Medium | |
0931 | Minimum Falling Path Sum | Array ,Dynamic Programming ,Matrix |
Medium | |
0932 | Beautiful Array | Array ,Math ,Divide and Conquer |
Medium | |
0933 | Number of Recent Calls | Design ,Queue ,Data Stream |
Easy | |
0934 | Shortest Bridge | Depth-First Search ,Breadth-First Search ,Array ,Matrix |
Medium | |
0935 | Knight Dialer | Dynamic Programming |
Medium | |
0936 | Stamping The Sequence | Stack ,Greedy ,Queue ,String |
Hard | |
0937 | Reorder Data in Log Files | Array ,String ,Sorting |
Easy | |
0938 | Range Sum of BST | Tree ,Depth-First Search ,Binary Search Tree ,Binary Tree |
Easy | |
0939 | Minimum Area Rectangle | Geometry ,Array ,Hash Table ,Math ,Sorting |
Medium | |
0940 | Distinct Subsequences II | String ,Dynamic Programming |
Hard | |
0941 | Valid Mountain Array | Array |
Easy | |
0942 | DI String Match | Greedy ,Array ,Math ,Two Pointers ,String |
Easy | |
0943 | Find the Shortest Superstring | Bit Manipulation ,Array ,String ,Dynamic Programming ,Bitmask |
Hard | |
0944 | Delete Columns to Make Sorted | Array ,String |
Easy | |
0945 | Minimum Increment to Make Array Unique | Greedy ,Array ,Counting ,Sorting |
Medium | |
0946 | Validate Stack Sequences | Stack ,Array ,Simulation |
Medium | |
0947 | Most Stones Removed with Same Row or Column | Depth-First Search ,Union Find ,Graph |
Medium | |
0948 | Bag of Tokens | Greedy ,Array ,Two Pointers ,Sorting |
Medium | |
0949 | Largest Time for Given Digits | String ,Enumeration |
Medium | |
0950 | Reveal Cards In Increasing Order | Queue ,Array ,Sorting ,Simulation |
Medium | |
0951 | Flip Equivalent Binary Trees | Tree ,Depth-First Search ,Binary Tree |
Medium | |
0952 | Largest Component Size by Common Factor | Union Find ,Array ,Math |
Hard | |
0953 | Verifying an Alien Dictionary | Array ,Hash Table ,String |
Easy | |
0954 | Array of Doubled Pairs | Greedy ,Array ,Hash Table ,Sorting |
Medium | |
0955 | Delete Columns to Make Sorted II | Greedy ,Array ,String |
Medium | |
0956 | Tallest Billboard | Array ,Dynamic Programming |
Hard | |
0957 | Prison Cells After N Days | Bit Manipulation ,Array ,Hash Table ,Math |
Medium | |
0958 | Check Completeness of a Binary Tree | Tree ,Breadth-First Search ,Binary Tree |
Medium | |
0959 | Regions Cut By Slashes | Depth-First Search ,Breadth-First Search ,Union Find ,Graph |
Medium | |
0960 | Delete Columns to Make Sorted III | Array ,String ,Dynamic Programming |
Hard | |
0961 | N-Repeated Element in Size 2N Array | Array ,Hash Table |
Easy | |
0962 | Maximum Width Ramp | Stack ,Array ,Monotonic Stack |
Medium | |
0963 | Minimum Area Rectangle II | Geometry ,Array ,Math |
Medium | |
0964 | Least Operators to Express Number | Math ,Dynamic Programming |
Hard | |
0965 | Univalued Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Easy | |
0966 | Vowel Spellchecker | Array ,Hash Table ,String |
Medium | |
0967 | Numbers With Same Consecutive Differences | Breadth-First Search ,Backtracking |
Medium | |
0968 | Binary Tree Cameras | Tree ,Depth-First Search ,Dynamic Programming ,Binary Tree |
Hard | |
0969 | Pancake Sorting | Greedy ,Array ,Two Pointers ,Sorting |
Medium | |
0983 | Minimum Cost For Tickets | Array ,Dynamic Programming |
Medium | |
0994 | Rotting Oranges | Breadth-First Search ,Array ,Matrix |
Medium | |
1001 | Grid Illumination | Array ,Hash Table |
Hard | |
1002 | Find Common Characters | Array ,Hash Table ,String |
Easy | |
1003 | Check If Word Is Valid After Substitutions | Stack ,String |
Medium | |
1004 | Max Consecutive Ones III | Array ,Binary Search ,Prefix Sum ,Sliding Window |
Medium | |
1005 | Maximize Sum Of Array After K Negations | Greedy ,Array ,Sorting |
Easy | |
1006 | Clumsy Factorial | Stack ,Math ,Simulation |
Medium | |
1007 | Minimum Domino Rotations For Equal Row | Greedy ,Array |
Medium | |
1008 | Construct Binary Search Tree from Preorder Traversal | Stack ,Tree ,Binary Search Tree ,Array ,Binary Tree ,Monotonic Stack |
Medium | |
1009 | Complement of Base 10 Integer | Bit Manipulation |
Easy | |
1010 | Pairs of Songs With Total Durations Divisible by 60 | Array ,Hash Table ,Counting |
Medium | |
1011 | Capacity To Ship Packages Within D Days | Greedy ,Array ,Binary Search |
Medium | |
1012 | Numbers With Repeated Digits | Math ,Dynamic Programming |
Hard | |
1025 | Divisor Game | Brainteaser ,Math ,Dynamic Programming ,Game Theory |
Easy | |
1026 | Maximum Difference Between Node and Ancestor | Tree ,Depth-First Search ,Binary Tree |
Medium | |
1027 | Longest Arithmetic Subsequence | Array ,Hash Table ,Binary Search ,Dynamic Programming |
Medium | |
1028 | Recover a Tree From Preorder Traversal | Tree ,Depth-First Search ,String ,Binary Tree |
Hard | |
1029 | Two City Scheduling | Greedy ,Array ,Sorting |
Medium | |
1030 | Matrix Cells in Distance Order | Geometry ,Array ,Math ,Matrix ,Sorting |
Easy | |
1031 | Maximum Sum of Two Non-Overlapping Subarrays | Array ,Dynamic Programming ,Sliding Window |
Medium | |
1032 | Stream of Characters | Design ,Trie ,Array ,String ,Data Stream |
Hard | |
1033 | Moving Stones Until Consecutive | Brainteaser ,Math |
Medium | |
1034 | Coloring A Border | Depth-First Search ,Breadth-First Search ,Array ,Matrix |
Medium | |
1035 | Uncrossed Lines | Array ,Dynamic Programming |
Medium | |
1036 | Escape a Large Maze | Depth-First Search ,Breadth-First Search ,Array ,Hash Table |
Hard | |
1039 | Minimum Score Triangulation of Polygon | Array ,Dynamic Programming |
Medium | |
1045 | Customers Who Bought All Products | Database |
Medium | 🔒 |
1046 | Last Stone Weight | Array ,Heap (Priority Queue) |
Easy | |
1047 | Remove All Adjacent Duplicates In String | Stack ,String |
Easy | |
1048 | Longest String Chain | Array ,Hash Table ,Two Pointers ,String ,Dynamic Programming |
Medium | |
1049 | Last Stone Weight II | Array ,Dynamic Programming |
Medium | |
1050 | Actors and Directors Who Cooperated At Least Three Times | Database |
Easy | 🔒 |
1051 | Height Checker | Array ,Counting Sort ,Sorting |
Easy | |
1052 | Grumpy Bookstore Owner | Array ,Sliding Window |
Medium | |
1053 | Previous Permutation With One Swap | Greedy ,Array |
Medium | |
1054 | Distant Barcodes | Greedy ,Array ,Hash Table ,Counting ,Sorting ,Heap (Priority Queue) |
Medium | |
1055 | Shortest Way to Form String | Greedy ,String ,Dynamic Programming |
Medium | 🔒 |
1057 | Campus Bikes | Greedy ,Array ,Sorting |
Medium | 🔒 |
1058 | Minimize Rounding Error to Meet Target | Greedy ,Array ,Math ,String |
Medium | 🔒 |
1059 | All Paths from Source Lead to Destination | Depth-First Search ,Graph |
Medium | 🔒 |
1060 | Missing Element in Sorted Array | Array ,Binary Search |
Medium | 🔒 |
1061 | Lexicographically Smallest Equivalent String | Union Find ,String |
Medium | 🔒 |
1062 | Longest Repeating Substring | String ,Binary Search ,Dynamic Programming ,Suffix Array ,Hash Function ,Rolling Hash |
Medium | 🔒 |
1063 | Number of Valid Subarrays | Stack ,Array ,Monotonic Stack |
Hard | 🔒 |
1068 | Product Sales Analysis I | Database |
Easy | 🔒 |
1069 | Product Sales Analysis II | Database |
Easy | 🔒 |
1070 | Product Sales Analysis III | Database |
Medium | 🔒 |
1071 | Greatest Common Divisor of Strings | Math ,String |
Easy | |
1072 | Flip Columns For Maximum Number of Equal Rows | Array ,Hash Table ,Matrix |
Medium | |
1073 | Adding Two Negabinary Numbers | Array ,Math |
Medium | |
1074 | Number of Submatrices That Sum to Target | Array ,Hash Table ,Matrix ,Prefix Sum |
Hard | |
1075 | Project Employees I | Database |
Easy | 🔒 |
1076 | Project Employees II | Database |
Easy | 🔒 |
1077 | Project Employees III | Database |
Medium | 🔒 |
1078 | Occurrences After Bigram | String |
Easy | |
1079 | Letter Tile Possibilities | String ,Backtracking |
Medium | |
1080 | Insufficient Nodes in Root to Leaf Paths | Tree ,Depth-First Search ,Binary Tree |
Medium | |
1081 | Smallest Subsequence of Distinct Characters | Stack ,Greedy ,String ,Monotonic Stack |
Medium | |
1085 | Sum of Digits in the Minimum Number | Array ,Math |
Easy | 🔒 |
1090 | Largest Values From Labels | Greedy ,Array ,Hash Table ,Counting ,Sorting |
Medium | |
1093 | Statistics from a Large Sample | Math ,Two Pointers ,Probability and Statistics |
Medium | |
1094 | Car Pooling | Array ,Prefix Sum ,Sorting ,Simulation ,Heap (Priority Queue) |
Medium | |
1095 | Find in Mountain Array | Array ,Binary Search ,Interactive |
Hard | |
1096 | Brace Expansion II | Stack ,Breadth-First Search ,String ,Backtracking |
Hard | |
1097 | Game Play Analysis V | Database |
Hard | 🔒 |
1098 | Unpopular Books | Database |
Medium | 🔒 |
1100 | Find K-Length Substrings With No Repeated Characters | Hash Table ,String ,Sliding Window |
Medium | 🔒 |
1101 | The Earliest Moment When Everyone Become Friends | Union Find ,Array |
Medium | 🔒 |
1102 | Path With Maximum Minimum Value | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Matrix ,Heap (Priority Queue) |
Medium | 🔒 |
1103 | Distribute Candies to People | Math ,Simulation |
Easy | |
1104 | Path In Zigzag Labelled Binary Tree | Tree ,Math ,Binary Tree |
Medium | |
1105 | Filling Bookcase Shelves | Array ,Dynamic Programming |
Medium | |
1106 | Parsing A Boolean Expression | Stack ,Recursion ,String |
Hard | |
1107 | New Users Daily Count | Database |
Medium | 🔒 |
1108 | Defanging an IP Address | String |
Easy | |
1109 | Corporate Flight Bookings | Array ,Prefix Sum |
Medium | |
1110 | Delete Nodes And Return Forest | Tree ,Depth-First Search ,Binary Tree |
Medium | |
1111 | Maximum Nesting Depth of Two Valid Parentheses Strings | Stack ,String |
Medium | |
1112 | Highest Grade For Each Student | Database |
Medium | 🔒 |
1113 | Reported Posts | Database |
Easy | 🔒 |
1114 | Print in Order | Concurrency |
Easy | |
1115 | Print FooBar Alternately | Concurrency |
Medium | |
1116 | Print Zero Even Odd | Concurrency |
Medium | |
1117 | Building H2O | Concurrency |
Medium | |
1118 | Number of Days in a Month | Math |
Easy | 🔒 |
1119 | Remove Vowels from a String | String |
Easy | 🔒 |
1120 | Maximum Average Subtree | Tree ,Depth-First Search ,Binary Tree |
Medium | 🔒 |
1122 | Relative Sort Array | Array ,Hash Table ,Counting Sort ,Sorting |
Easy | |
1123 | Lowest Common Ancestor of Deepest Leaves | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table ,Binary Tree |
Medium | |
1124 | Longest Well-Performing Interval | Stack ,Array ,Hash Table ,Prefix Sum ,Monotonic Stack |
Medium | |
1125 | Smallest Sufficient Team | Bit Manipulation ,Array ,Dynamic Programming ,Bitmask |
Hard | |
1126 | Active Businesses | Database |
Medium | 🔒 |
1127 | User Purchase Platform | Database |
Hard | 🔒 |
1128 | Number of Equivalent Domino Pairs | Array ,Hash Table ,Counting |
Easy | |
1129 | Shortest Path with Alternating Colors | Breadth-First Search ,Graph |
Medium | |
1130 | Minimum Cost Tree From Leaf Values | Stack ,Greedy ,Dynamic Programming ,Monotonic Stack |
Medium | |
1131 | Maximum of Absolute Value Expression | Array ,Math |
Medium | |
1132 | Reported Posts II | Database |
Medium | 🔒 |
1133 | Largest Unique Number | Array ,Hash Table ,Sorting |
Easy | 🔒 |
1134 | Armstrong Number | Math |
Easy | 🔒 |
1135 | Connecting Cities With Minimum Cost | Union Find ,Graph ,Minimum Spanning Tree ,Heap (Priority Queue) |
Medium | 🔒 |
1136 | Parallel Courses | Graph ,Topological Sort |
Medium | 🔒 |
1137 | N-th Tribonacci Number | Memoization ,Math ,Dynamic Programming |
Easy | |
1138 | Alphabet Board Path | Hash Table ,String |
Medium | |
1139 | Largest 1-Bordered Square | Array ,Dynamic Programming ,Matrix |
Medium | |
1140 | Stone Game II | Array ,Math ,Dynamic Programming ,Game Theory |
Medium | |
1141 | User Activity for the Past 30 Days I | Database |
Easy | 🔒 |
1148 | Article Views I | Database |
Easy | 🔒 |
1149 | Article Views II | Database |
Medium | 🔒 |
1150 | Check If a Number Is Majority Element in a Sorted Array | Array ,Binary Search |
Easy | 🔒 |
1151 | Minimum Swaps to Group All 1's Together | Array ,Sliding Window |
Medium | 🔒 |
1152 | Analyze User Website Visit Pattern | Array ,Hash Table ,Sorting |
Medium | 🔒 |
1154 | Day of the Year | Math ,String |
Easy | |
1155 | Number of Dice Rolls With Target Sum | Dynamic Programming |
Medium | |
1156 | Swap For Longest Repeated Character Substring | String ,Sliding Window |
Medium | |
1157 | Online Majority Element In Subarray | Design ,Binary Indexed Tree ,Segment Tree ,Array ,Binary Search |
Hard | |
1160 | Find Words That Can Be Formed by Characters | Array ,Hash Table ,String |
Easy | |
1163 | Last Substring in Lexicographical Order | Two Pointers ,String |
Hard | |
1164 | Product Price at a Given Date | Database |
Medium | 🔒 |
1167 | Minimum Cost to Connect Sticks | Greedy ,Array ,Heap (Priority Queue) |
Medium | 🔒 |
1168 | Optimize Water Distribution in a Village | Union Find ,Graph ,Minimum Spanning Tree |
Hard | 🔒 |
1173 | Immediate Food Delivery I | Database |
Easy | 🔒 |
1174 | Immediate Food Delivery II | Database |
Medium | 🔒 |
1176 | Diet Plan Performance | Array ,Sliding Window |
Easy | 🔒 |
1177 | Can Make Palindrome from Substring | Bit Manipulation ,Hash Table ,String ,Prefix Sum |
Medium | |
1178 | Number of Valid Words for Each Puzzle | Bit Manipulation ,Trie ,Array ,Hash Table ,String |
Hard | |
1179 | Reformat Department Table | Database |
Easy | |
1180 | Count Substrings with Only One Distinct Letter | Math ,String |
Easy | 🔒 |
1181 | Before and After Puzzle | Array ,Hash Table ,String ,Sorting |
Medium | 🔒 |
1182 | Shortest Distance to Target Color | Array ,Binary Search ,Dynamic Programming |
Medium | 🔒 |
1183 | Maximum Number of Ones | Greedy ,Heap (Priority Queue) |
Hard | 🔒 |
1184 | Distance Between Bus Stops | Array |
Easy | |
1185 | Day of the Week | Math |
Easy | |
1186 | Maximum Subarray Sum with One Deletion | Array ,Dynamic Programming |
Medium | |
1187 | Make Array Strictly Increasing | Array ,Binary Search ,Dynamic Programming |
Hard | |
1188 | Design Bounded Blocking Queue | Concurrency |
Medium | 🔒 |
1189 | Maximum Number of Balloons | Hash Table ,String ,Counting |
Easy | |
1190 | Reverse Substrings Between Each Pair of Parentheses | Stack ,String |
Medium | |
1191 | K-Concatenation Maximum Sum | Array ,Dynamic Programming |
Medium | |
1192 | Critical Connections in a Network | Depth-First Search ,Graph ,Biconnected Component |
Hard | |
1193 | Monthly Transactions I | Database |
Medium | 🔒 |
1194 | Tournament Winners | Database |
Hard | 🔒 |
1195 | Fizz Buzz Multithreaded | Concurrency |
Medium | |
1196 | How Many Apples Can You Put into the Basket | Greedy ,Array ,Sorting |
Easy | 🔒 |
1197 | Minimum Knight Moves | Breadth-First Search |
Medium | 🔒 |
1198 | Find Smallest Common Element in All Rows | Array ,Hash Table ,Binary Search ,Counting ,Matrix |
Medium | 🔒 |
1200 | Minimum Absolute Difference | Array ,Sorting |
Easy | |
1201 | Ugly Number III | Math ,Binary Search ,Number Theory |
Medium | |
1202 | Smallest String With Swaps | Depth-First Search ,Breadth-First Search ,Union Find ,Hash Table ,String |
Medium | |
1203 | Sort Items by Groups Respecting Dependencies | Depth-First Search ,Breadth-First Search ,Graph ,Topological Sort |
Hard | |
1207 | Unique Number of Occurrences | Array ,Hash Table |
Easy | |
1208 | Get Equal Substrings Within Budget | String ,Binary Search ,Prefix Sum ,Sliding Window |
Medium | |
1209 | Remove All Adjacent Duplicates in String II | Stack ,String |
Medium | |
1210 | Minimum Moves to Reach Target with Rotations | Breadth-First Search ,Array ,Matrix |
Hard | |
1213 | Intersection of Three Sorted Arrays | Array ,Hash Table ,Binary Search ,Counting |
Easy | 🔒 |
1214 | Two Sum BSTs | Stack ,Tree ,Depth-First Search ,Binary Search Tree ,Two Pointers ,Binary Search ,Binary Tree |
Medium | 🔒 |
1215 | Stepping Numbers | Breadth-First Search ,Backtracking |
Medium | 🔒 |
1225 | Report Contiguous Dates | Database |
Hard | 🔒 |
1227 | Airplane Seat Assignment Probability | Brainteaser ,Math ,Dynamic Programming ,Probability and Statistics |
Medium | |
1228 | Missing Number In Arithmetic Progression | Array ,Math |
Easy | 🔒 |
1229 | Meeting Scheduler | Array ,Two Pointers ,Sorting |
Medium | 🔒 |
1231 | Divide Chocolate | Array ,Binary Search |
Hard | 🔒 |
1237 | Find Positive Integer Solution for a Given Equation | Math ,Two Pointers ,Binary Search ,Interactive |
Medium | |
1238 | Circular Permutation in Binary Representation | Bit Manipulation ,Math ,Backtracking |
Medium | |
1239 | Maximum Length of a Concatenated String with Unique Characters | Bit Manipulation ,Array ,String ,Backtracking |
Medium | |
1240 | Tiling a Rectangle with the Fewest Squares | Dynamic Programming ,Backtracking |
Hard | |
1241 | Number of Comments per Post | Database |
Easy | 🔒 |
1242 | Web Crawler Multithreaded | Depth-First Search ,Breadth-First Search ,Concurrency |
Medium | 🔒 |
1246 | Palindrome Removal | Array ,Dynamic Programming |
Hard | 🔒 |
1247 | Minimum Swaps to Make Strings Equal | Greedy ,Math ,String |
Medium | |
1248 | Count Number of Nice Subarrays | Array ,Hash Table ,Math ,Sliding Window |
Medium | |
1249 | Minimum Remove to Make Valid Parentheses | Stack ,String |
Medium | |
1250 | Check If It Is a Good Array | Array ,Math ,Number Theory |
Hard | |
1251 | Average Selling Price | Database |
Easy | 🔒 |
1252 | Cells with Odd Values in a Matrix | Array ,Math ,Simulation |
Easy | |
1253 | Reconstruct a 2-Row Binary Matrix | Greedy ,Array ,Matrix |
Medium | |
1254 | Number of Closed Islands | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Matrix |
Medium | |
1255 | Maximum Score Words Formed by Letters | Bit Manipulation ,Array ,String ,Dynamic Programming ,Backtracking ,Bitmask |
Hard | |
1256 | Encode Number | Bit Manipulation ,Math ,String |
Medium | 🔒 |
1257 | Smallest Common Region | Tree ,Depth-First Search ,Breadth-First Search ,Array ,Hash Table ,String |
Medium | 🔒 |
1258 | Synonymous Sentences | Union Find ,Array ,Hash Table ,String ,Backtracking |
Medium | 🔒 |
1259 | Handshakes That Don't Cross | Math ,Dynamic Programming |
Hard | 🔒 |
1260 | Shift 2D Grid | Array ,Matrix ,Simulation |
Easy | |
1261 | Find Elements in a Contaminated Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Design ,Binary Tree |
Medium | |
1262 | Greatest Sum Divisible by Three | Greedy ,Array ,Dynamic Programming |
Medium | |
1263 | Minimum Moves to Move a Box to Their Target Location | Breadth-First Search ,Array ,Matrix ,Heap (Priority Queue) |
Hard | |
1271 | Hexspeak | Math ,String |
Easy | 🔒 |
1272 | Remove Interval | Array |
Medium | 🔒 |
1273 | Delete Tree Nodes | Tree ,Depth-First Search ,Breadth-First Search |
Medium | 🔒 |
1274 | Number of Ships in a Rectangle | Array ,Divide and Conquer ,Interactive |
Hard | 🔒 |
1279 | Traffic Light Controlled Intersection | Concurrency |
Easy | 🔒 |
1280 | Students and Examinations | Database |
Easy | 🔒 |
1282 | Group the People Given the Group Size They Belong To | Array ,Hash Table |
Medium | |
1283 | Find the Smallest Divisor Given a Threshold | Array ,Binary Search |
Medium | |
1284 | Minimum Number of Flips to Convert Binary Matrix to Zero Matrix | Bit Manipulation ,Breadth-First Search ,Array ,Matrix |
Hard | |
1285 | Find the Start and End Number of Continuous Ranges | Database |
Medium | 🔒 |
1286 | Iterator for Combination | Design ,String ,Backtracking ,Iterator |
Medium | |
1287 | Element Appearing More Than 25% In Sorted Array | Array |
Easy | |
1288 | Remove Covered Intervals | Array ,Sorting |
Medium | |
1289 | Minimum Falling Path Sum II | Array ,Dynamic Programming ,Matrix |
Hard | |
1290 | Convert Binary Number in a Linked List to Integer | Linked List ,Math |
Easy | |
1291 | Sequential Digits | Enumeration |
Medium | |
1292 | Maximum Side Length of a Square with Sum Less than or Equal to Threshold | Array ,Binary Search ,Matrix ,Prefix Sum |
Medium | |
1293 | Shortest Path in a Grid with Obstacles Elimination | Breadth-First Search ,Array ,Matrix |
Hard | |
1294 | Weather Type in Each Country | Database |
Easy | 🔒 |
1295 | Find Numbers with Even Number of Digits | Array |
Easy | |
1296 | Divide Array in Sets of K Consecutive Numbers | Greedy ,Array ,Hash Table ,Sorting |
Medium | |
1297 | Maximum Number of Occurrences of a Substring | Hash Table ,String ,Sliding Window |
Medium | |
1298 | Maximum Candies You Can Get from Boxes | Breadth-First Search ,Array |
Hard | |
1299 | Replace Elements with Greatest Element on Right Side | Array |
Easy | |
1300 | Sum of Mutated Array Closest to Target | Array ,Binary Search ,Sorting |
Medium | |
1301 | Number of Paths with Max Score | Array ,Dynamic Programming ,Matrix |
Hard | |
1303 | Find the Team Size | Database |
Easy | 🔒 |
1304 | Find N Unique Integers Sum up to Zero | Array ,Math |
Easy | |
1305 | All Elements in Two Binary Search Trees | Tree ,Depth-First Search ,Binary Search Tree ,Binary Tree ,Sorting |
Medium | |
1306 | Jump Game III | Depth-First Search ,Breadth-First Search ,Array |
Medium | |
1307 | Verbal Arithmetic Puzzle | Array ,Math ,String ,Backtracking |
Hard | |
1308 | Running Total for Different Genders | Database |
Medium | 🔒 |
1309 | Decrypt String from Alphabet to Integer Mapping | String |
Easy | |
1310 | XOR Queries of a Subarray | Bit Manipulation ,Array ,Prefix Sum |
Medium | |
1311 | Get Watched Videos by Your Friends | Breadth-First Search ,Array ,Hash Table ,Sorting |
Medium | |
1312 | Minimum Insertion Steps to Make a String Palindrome | String ,Dynamic Programming |
Hard | |
1313 | Decompress Run-Length Encoded List | Array |
Easy | |
1314 | Matrix Block Sum | Array ,Matrix ,Prefix Sum |
Medium | |
1315 | Sum of Nodes with Even-Valued Grandparent | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
1317 | Convert Integer to the Sum of Two No-Zero Integers | Math |
Easy | |
1318 | Minimum Flips to Make a OR b Equal to c | Bit Manipulation |
Medium | |
1319 | Number of Operations to Make Network Connected | Depth-First Search ,Breadth-First Search ,Union Find ,Graph |
Medium | |
1320 | Minimum Distance to Type a Word Using Two Fingers | String ,Dynamic Programming |
Hard | |
1321 | Restaurant Growth | Database |
Medium | 🔒 |
1322 | Ads Performance | Database |
Easy | 🔒 |
1323 | Maximum 69 Number | Greedy ,Math |
Easy | |
1324 | Print Words Vertically | Array ,String ,Simulation |
Medium | |
1325 | Delete Leaves With a Given Value | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table ,Binary Tree |
Medium | |
1326 | Minimum Number of Taps to Open to Water a Garden | Greedy ,Array ,Dynamic Programming |
Hard | |
1330 | Reverse Subarray To Maximize Array Value | Greedy ,Array ,Math |
Hard | |
1331 | Rank Transform of an Array | Array ,Hash Table ,Sorting |
Easy | |
1336 | Number of Transactions per Visit | Database |
Hard | 🔒 |
1339 | Maximum Product of Splitted Binary Tree | Tree ,Depth-First Search ,Binary Tree |
Medium | |
1340 | Jump Game V | Array ,Dynamic Programming ,Sorting |
Hard | |
1341 | Movie Rating | Database |
Medium | 🔒 |
1342 | Number of Steps to Reduce a Number to Zero | Bit Manipulation ,Math |
Easy | |
1343 | Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold | Array ,Sliding Window |
Medium | |
1344 | Angle Between Hands of a Clock | Math |
Medium | |
1345 | Jump Game IV | Breadth-First Search ,Array ,Hash Table |
Hard | |
1346 | Check If N and Its Double Exist | Array ,Hash Table ,Two Pointers ,Binary Search ,Sorting |
Easy | |
1347 | Minimum Number of Steps to Make Two Strings Anagram | Hash Table ,String |
Medium | |
1348 | Tweet Counts Per Frequency | Design ,Hash Table ,Binary Search ,Ordered Set ,Sorting |
Medium | |
1349 | Maximum Students Taking Exam | Bit Manipulation ,Array ,Dynamic Programming ,Bitmask ,Matrix |
Hard | |
1350 | Students With Invalid Departments | Database |
Easy | 🔒 |
1351 | Count Negative Numbers in a Sorted Matrix | Array ,Binary Search ,Matrix |
Easy | |
1352 | Product of the Last K Numbers | Design ,Queue ,Array ,Math ,Data Stream |
Medium | |
1353 | Maximum Number of Events That Can Be Attended | Greedy ,Array ,Heap (Priority Queue) |
Medium | |
1354 | Construct Target Array With Multiple Sums | Array ,Heap (Priority Queue) |
Hard | |
1355 | Activity Participants | Database |
Medium | 🔒 |
1357 | Apply Discount Every n Orders | Design ,Array ,Hash Table |
Medium | |
1364 | Number of Trusted Contacts of a Customer | Database |
Medium | 🔒 |
1365 | How Many Numbers Are Smaller Than the Current Number | Array ,Hash Table ,Counting ,Sorting |
Easy | |
1366 | Rank Teams by Votes | Array ,Hash Table ,String ,Counting ,Sorting |
Medium | |
1367 | Linked List in Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Linked List ,Binary Tree |
Medium | |
1368 | Minimum Cost to Make at Least One Valid Path in a Grid | Breadth-First Search ,Graph ,Array ,Matrix ,Shortest Path ,Heap (Priority Queue) |
Hard | |
1369 | Get the Second Most Recent Activity | Database |
Hard | 🔒 |
1370 | Increasing Decreasing String | Hash Table ,String ,Counting |
Easy | |
1371 | Find the Longest Substring Containing Vowels in Even Counts | Bit Manipulation ,Hash Table ,String ,Prefix Sum |
Medium | |
1372 | Longest ZigZag Path in a Binary Tree | Tree ,Depth-First Search ,Dynamic Programming ,Binary Tree |
Medium | |
1373 | Maximum Sum BST in Binary Tree | Tree ,Depth-First Search ,Binary Search Tree ,Dynamic Programming ,Binary Tree |
Hard | |
1374 | Generate a String With Characters That Have Odd Counts | String |
Easy | |
1375 | Bulb Switcher III | Array |
Medium | |
1376 | Time Needed to Inform All Employees | Tree ,Depth-First Search ,Breadth-First Search |
Medium | |
1377 | Frog Position After T Seconds | Tree ,Depth-First Search ,Breadth-First Search ,Graph |
Hard | |
1378 | Replace Employee ID With The Unique Identifier | Database |
Easy | 🔒 |
1379 | Find a Corresponding Node of a Binary Tree in a Clone of That Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
1380 | Lucky Numbers in a Matrix | Array ,Matrix |
Easy | |
1381 | Design a Stack With Increment Operation | Stack ,Design ,Array |
Medium | |
1382 | Balance a Binary Search Tree | Greedy ,Tree ,Depth-First Search ,Binary Search Tree ,Divide and Conquer ,Binary Tree |
Medium | |
1383 | Maximum Performance of a Team | Greedy ,Array ,Sorting ,Heap (Priority Queue) |
Hard | |
1384 | Total Sales Amount by Year | Database |
Hard | 🔒 |
1385 | Find the Distance Value Between Two Arrays | Array ,Two Pointers ,Binary Search ,Sorting |
Easy | |
1386 | Cinema Seat Allocation | Greedy ,Bit Manipulation ,Array ,Hash Table |
Medium | |
1387 | Sort Integers by The Power Value | Memoization ,Dynamic Programming ,Sorting |
Medium | |
1388 | Pizza With 3n Slices | Greedy ,Array ,Dynamic Programming ,Heap (Priority Queue) |
Hard | |
1389 | Create Target Array in the Given Order | Array ,Simulation |
Easy | |
1390 | Four Divisors | Array ,Math |
Medium | |
1391 | Check if There is a Valid Path in a Grid | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Matrix |
Medium | |
1392 | Longest Happy Prefix | String ,String Matching ,Hash Function ,Rolling Hash |
Hard | |
1393 | Capital GainLoss | Database |
Medium | 🔒 |
1394 | Find Lucky Integer in an Array | Array ,Hash Table ,Counting |
Easy | |
1395 | Count Number of Teams | Binary Indexed Tree ,Array ,Dynamic Programming |
Medium | |
1396 | Design Underground System | Design ,Hash Table ,String |
Medium | |
1397 | Find All Good Strings | String ,Dynamic Programming ,String Matching |
Hard | |
1398 | Customers Who Bought Products A and B but Not C | Database |
Medium | 🔒 |
1399 | Count Largest Group | Hash Table ,Math |
Easy | |
1400 | Construct K Palindrome Strings | Greedy ,Hash Table ,String ,Counting |
Medium | |
1401 | Circle and Rectangle Overlapping | Geometry ,Math |
Medium | |
1402 | Reducing Dishes | Greedy ,Array ,Dynamic Programming ,Sorting |
Hard | |
1403 | Minimum Subsequence in Non-Increasing Order | Greedy ,Array ,Sorting |
Easy | |
1404 | Number of Steps to Reduce a Number in Binary Representation to One | Bit Manipulation ,String |
Medium | |
1405 | Longest Happy String | Greedy ,String ,Heap (Priority Queue) |
Medium | |
1406 | Stone Game III | Array ,Math ,Dynamic Programming ,Game Theory |
Hard | |
1407 | Top Travellers | Database |
Easy | 🔒 |
1408 | String Matching in an Array | String ,String Matching |
Easy | |
1409 | Queries on a Permutation With Key | Binary Indexed Tree ,Array ,Simulation |
Medium | |
1410 | HTML Entity Parser | Hash Table ,String |
Medium | |
1411 | Number of Ways to Paint N × 3 Grid | Dynamic Programming |
Hard | |
1412 | Find the Quiet Students in All Exams | Database |
Hard | 🔒 |
1413 | Minimum Value to Get Positive Step by Step Sum | Array ,Prefix Sum |
Easy | |
1414 | Find the Minimum Number of Fibonacci Numbers Whose Sum Is K | Greedy |
Medium | |
1415 | The k-th Lexicographical String of All Happy Strings of Length n | String ,Backtracking |
Medium | |
1416 | Restore The Array | String ,Dynamic Programming |
Hard | |
1417 | Reformat The String | String |
Easy | |
1418 | Display Table of Food Orders in a Restaurant | Array ,Hash Table ,String ,Ordered Set ,Sorting |
Medium | |
1419 | Minimum Number of Frogs Croaking | String ,Counting |
Medium | |
1420 | Build Array Where You Can Find The Maximum Exactly K Comparisons | Dynamic Programming |
Hard | |
1421 | NPV Queries | Database |
Medium | 🔒 |
1422 | Maximum Score After Splitting a String | String |
Easy | |
1423 | Maximum Points You Can Obtain from Cards | Array ,Prefix Sum ,Sliding Window |
Medium | |
1424 | Diagonal Traverse II | Array ,Sorting ,Heap (Priority Queue) |
Medium | |
1425 | Constrained Subsequence Sum | Queue ,Array ,Dynamic Programming ,Sliding Window ,Monotonic Queue ,Heap (Priority Queue) |
Hard | |
1426 | Counting Elements | Array ,Hash Table |
Easy | 🔒 |
1428 | Leftmost Column with at Least a One | Array ,Binary Search ,Interactive ,Matrix |
Medium | 🔒 |
1429 | First Unique Number | Design ,Queue ,Array ,Hash Table ,Data Stream |
Medium | 🔒 |
1430 | Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | 🔒 |
1431 | Kids With the Greatest Number of Candies | Array |
Easy | |
1432 | Max Difference You Can Get From Changing an Integer | Greedy ,Math |
Medium | |
1433 | Check If a String Can Break Another String | Greedy ,String ,Sorting |
Medium | |
1434 | Number of Ways to Wear Different Hats to Each Other | Bit Manipulation ,Array ,Dynamic Programming ,Bitmask |
Hard | |
1436 | Destination City | Hash Table ,String |
Easy | |
1437 | Check If All 1's Are at Least Length K Places Away | Array |
Easy | |
1438 | Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit | Queue ,Array ,Ordered Set ,Sliding Window ,Monotonic Queue ,Heap (Priority Queue) |
Medium | |
1439 | Find the Kth Smallest Sum of a Matrix With Sorted Rows | Array ,Binary Search ,Matrix ,Heap (Priority Queue) |
Hard | |
1441 | Build an Array With Stack Operations | Stack ,Array ,Simulation |
Easy | |
1442 | Count Triplets That Can Form Two Arrays of Equal XOR | Bit Manipulation ,Array ,Hash Table ,Math ,Prefix Sum |
Medium | |
1443 | Minimum Time to Collect All Apples in a Tree | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table |
Medium | |
1444 | Number of Ways of Cutting a Pizza | Memoization ,Array ,Dynamic Programming ,Matrix |
Hard | |
1446 | Consecutive Characters | String |
Easy | |
1447 | Simplified Fractions | Math |
Medium | |
1448 | Count Good Nodes in Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Binary Tree |
Medium | |
1449 | Form Largest Integer With Digits That Add up to Target | Array ,Dynamic Programming |
Hard | |
1474 | Delete N Nodes After M Nodes of a Linked List | Linked List |
Easy | 🔒 |
1483 | Kth Ancestor of a Tree Node | Tree ,Depth-First Search ,Breadth-First Search ,Design ,Binary Search ,Dynamic Programming |
Hard | |
1490 | Clone N-ary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table |
Medium | 🔒 |
1495 | Friendly Movies Streamed Last Month | Database |
Easy | 🔒 |
1500 | Design a File Sharing System | Design ,Hash Table ,Data Stream ,Heap (Priority Queue) |
Medium | 🔒 |
1501 | Countries You Can Safely Invest In | Database |
Medium | 🔒 |
1506 | Find Root of N-Ary Tree | Bit Manipulation ,Tree ,Depth-First Search ,Hash Table |
Medium | 🔒 |
1507 | Reformat Date | String |
Easy | |
1511 | Customer Order Frequency | Database |
Easy | 🔒 |
1512 | Number of Good Pairs | Array ,Hash Table ,Math ,Counting |
Easy | |
1513 | Number of Substrings With Only 1s | Math ,String |
Medium | |
1515 | Best Position for a Service Centre | Geometry ,Math ,Randomized |
Hard | |
1516 | Move Sub-Tree of N-Ary Tree | Tree ,Depth-First Search |
Hard | 🔒 |
1517 | Find Users With Valid E-Mails | Database |
Easy | 🔒 |
1518 | Water Bottles | Math ,Simulation |
Easy | |
1519 | Number of Nodes in the Sub-Tree With the Same Label | Tree ,Depth-First Search ,Breadth-First Search |
Medium | |
1520 | Maximum Number of Non-Overlapping Substrings | Greedy ,String |
Hard | |
1521 | Find a Value of a Mysterious Function Closest to Target | Bit Manipulation ,Segment Tree ,Array ,Binary Search |
Hard | |
1522 | Diameter of N-Ary Tree | Tree ,Depth-First Search |
Medium | 🔒 |
1526 | Minimum Number of Increments on Subarrays to Form a Target Array | Stack ,Greedy ,Array ,Dynamic Programming ,Monotonic Stack |
Hard | |
1527 | Patients With a Condition | Database |
Easy | 🔒 |
1528 | Shuffle String | Array ,String |
Easy | |
1529 | Bulb Switcher IV | Greedy ,String |
Medium | |
1530 | Number of Good Leaf Nodes Pairs | Tree ,Depth-First Search ,Binary Tree |
Medium | |
1531 | String Compression II | String ,Dynamic Programming |
Hard | |
1532 | The Most Recent Three Orders | Database |
Medium | 🔒 |
1533 | Find the Index of the Large Integer | Array ,Binary Search ,Interactive |
Medium | 🔒 |
1534 | Count Good Triplets | Array ,Enumeration |
Easy | |
1535 | Find the Winner of an Array Game | Array ,Simulation |
Medium | |
1536 | Minimum Swaps to Arrange a Binary Grid | Greedy ,Array ,Matrix |
Medium | |
1537 | Get the Maximum Score | Greedy ,Array ,Two Pointers ,Dynamic Programming |
Hard | |
1539 | Kth Missing Positive Number | Array ,Binary Search |
Easy | |
1540 | Can Convert String in K Moves | Hash Table ,String |
Medium | |
1541 | Minimum Insertions to Balance a Parentheses String | Stack ,Greedy ,String |
Medium | |
1542 | Find Longest Awesome Substring | Bit Manipulation ,Hash Table ,String |
Hard | |
1544 | Make The String Great | Stack ,String |
Easy | |
1545 | Find Kth Bit in Nth Binary String | Recursion ,String |
Medium | |
1546 | Maximum Number of Non-Overlapping Subarrays With Sum Equals Target | Greedy ,Array ,Hash Table ,Prefix Sum |
Medium | |
1547 | Minimum Cost to Cut a Stick | Array ,Dynamic Programming |
Hard | |
1550 | Three Consecutive Odds | Array |
Easy | |
1554 | Strings Differ by One Character | Hash Table ,String ,Hash Function ,Rolling Hash |
Medium | 🔒 |
1555 | Bank Account Summary | Database |
Medium | 🔒 |
1556 | Thousand Separator | String |
Easy | |
1557 | Minimum Number of Vertices to Reach All Nodes | Graph |
Medium | |
1558 | Minimum Numbers of Function Calls to Make Target Array | Greedy ,Array |
Medium | |
1559 | Detect Cycles in 2D Grid | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Matrix |
Medium | |
1564 | Put Boxes Into the Warehouse I | Greedy ,Array ,Sorting |
Medium | 🔒 |
1565 | Unique Orders and Customers Per Month | Database |
Easy | 🔒 |
1568 | Minimum Number of Days to Disconnect Island | Depth-First Search ,Breadth-First Search ,Array ,Matrix ,Strongly Connected Component |
Hard | |
1569 | Number of Ways to Reorder Array to Get Same BST | Tree ,Union Find ,Binary Search Tree ,Memoization ,Array ,Math ,Divide and Conquer ,Dynamic Programming ,Binary Tree ,Combinatorics |
Hard | |
1570 | Dot Product of Two Sparse Vectors | Design ,Array ,Hash Table ,Two Pointers |
Medium | 🔒 |
1571 | Warehouse Manager | Database |
Easy | 🔒 |
1576 | Replace All 's to Avoid Consecutive Repeating Characters | String |
Easy | |
1577 | Number of Ways Where Square of Number Is Equal to Product of Two Numbers | Array ,Hash Table ,Math ,Two Pointers |
Medium | |
1578 | Minimum Deletion Cost to Avoid Repeating Letters | Greedy ,Array ,String ,Dynamic Programming |
Medium | |
1579 | Remove Max Number of Edges to Keep Graph Fully Traversable | Union Find ,Graph |
Hard | |
1580 | Put Boxes Into the Warehouse II | Greedy ,Array ,Sorting |
Medium | 🔒 |
1582 | Special Positions in a Binary Matrix | Array ,Matrix |
Easy | |
1583 | Count Unhappy Friends | Array ,Simulation |
Medium | |
1584 | Min Cost to Connect All Points | Union Find ,Array ,Minimum Spanning Tree |
Medium | |
1585 | Check If String Is Transformable With Substring Sort Operations | Greedy ,String ,Sorting |
Hard | |
1588 | Sum of All Odd Length Subarrays | Array ,Math ,Prefix Sum |
Easy | |
1589 | Maximum Sum Obtained of Any Permutation | Greedy ,Array ,Prefix Sum ,Sorting |
Medium | |
1590 | Make Sum Divisible by P | Array ,Hash Table ,Prefix Sum |
Medium | |
1591 | Strange Printer II | Graph ,Topological Sort ,Array ,Matrix |
Hard | |
1592 | Rearrange Spaces Between Words | String |
Easy | |
1593 | Split a String Into the Max Number of Unique Substrings | Hash Table ,String ,Backtracking |
Medium | |
1594 | Maximum Non Negative Product in a Matrix | Array ,Dynamic Programming ,Matrix |
Medium | |
1595 | Minimum Cost to Connect Two Groups of Points | Bit Manipulation ,Array ,Dynamic Programming ,Bitmask ,Matrix |
Hard | |
1598 | Crawler Log Folder | Stack ,Array ,String |
Easy | |
1599 | Maximum Profit of Operating a Centennial Wheel | Array ,Simulation |
Medium | |
1600 | Throne Inheritance | Tree ,Depth-First Search ,Design ,Hash Table |
Medium | |
1601 | Maximum Number of Achievable Transfer Requests | Bit Manipulation ,Enumeration |
Hard | |
1603 | Design Parking System | Design ,Counting ,Simulation |
Easy | |
1604 | Alert Using Same Key-Card Three or More Times in a One Hour Period | Array ,Hash Table ,String ,Sorting |
Medium | |
1605 | Find Valid Matrix Given Row and Column Sums | Greedy ,Array ,Matrix |
Medium | |
1606 | Find Servers That Handled Most Number of Requests | Greedy ,Array ,Ordered Set ,Heap (Priority Queue) |
Hard | |
1614 | Maximum Nesting Depth of the Parentheses | Stack ,String |
Easy | |
1618 | Maximum Font to Fit a Sentence in a Screen | Array ,String ,Binary Search ,Interactive |
Medium | 🔒 |
1619 | Mean of Array After Removing Some Elements | Array ,Sorting |
Easy | |
1627 | Graph Connectivity With Threshold | Union Find ,Array ,Math |
Hard | |
1632 | Rank Transform of a Matrix | Greedy ,Union Find ,Graph ,Topological Sort ,Array ,Matrix |
Hard | |
1640 | Check Array Formation Through Concatenation | Array ,Hash Table |
Easy | |
1651 | Hopper Company Queries III | Database |
Hard | 🔒 |
1660 | Correct a Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table ,Binary Tree |
Medium | 🔒 |
1661 | Average Time of Process per Machine | Database |
Easy | 🔒 |
1662 | Check If Two String Arrays are Equivalent | Array ,String |
Easy | |
1666 | Change the Root of a Binary Tree | Tree ,Depth-First Search ,Binary Tree |
Medium | 🔒 |
1667 | Fix Names in a Table | Database |
Easy | 🔒 |
1676 | Lowest Common Ancestor of a Binary Tree IV | Tree ,Depth-First Search ,Binary Tree |
Medium | 🔒 |
1677 | Product's Worth Over Invoices | Database |
Easy | 🔒 |
1678 | Goal Parser Interpretation | String |
Easy | |
1679 | Max Number of K-Sum Pairs | Array ,Hash Table ,Two Pointers ,Sorting |
Medium | |
1680 | Concatenation of Consecutive Binary Numbers | Bit Manipulation ,Math ,Simulation |
Medium | |
1681 | Minimum Incompatibility | Bit Manipulation ,Array ,Dynamic Programming ,Bitmask |
Hard | |
1682 | Longest Palindromic Subsequence II | String ,Dynamic Programming |
Medium | 🔒 |
1688 | Count of Matches in Tournament | Math ,Simulation |
Easy | |
1689 | Partitioning Into Minimum Number Of Deci-Binary Numbers | Greedy ,String |
Medium | |
1690 | Stone Game VII | Array ,Math ,Dynamic Programming ,Game Theory |
Medium | |
1691 | Maximum Height by Stacking Cuboids | Array ,Dynamic Programming ,Sorting |
Hard | |
1693 | Daily Leads and Partners | Database |
Easy | 🔒 |
1694 | Reformat Phone Number | String |
Easy | |
1695 | Maximum Erasure Value | Array ,Hash Table ,Sliding Window |
Medium | |
1696 | Jump Game VI | Queue ,Array ,Dynamic Programming ,Sliding Window ,Monotonic Queue ,Heap (Priority Queue) |
Medium | |
1697 | Checking Existence of Edge Length Limited Paths | Union Find ,Graph ,Array ,Sorting |
Hard | |
1698 | Number of Distinct Substrings in a String | Trie ,String ,Suffix Array ,Hash Function ,Rolling Hash |
Medium | 🔒 |
1699 | Number of Calls Between Two Persons | Database |
Medium | 🔒 |
1700 | Number of Students Unable to Eat Lunch | Stack ,Queue ,Array ,Simulation |
Easy | |
1701 | Average Waiting Time | Array ,Simulation |
Medium | |
1702 | Maximum Binary String After Change | Greedy ,String |
Medium | |
1703 | Minimum Adjacent Swaps for K Consecutive Ones | Greedy ,Array ,Prefix Sum ,Sliding Window |
Hard | |
1704 | Determine if String Halves Are Alike | String ,Counting |
Easy | |
1705 | Maximum Number of Eaten Apples | Greedy ,Array ,Heap (Priority Queue) |
Medium | |
1707 | Maximum XOR With an Element From Array | Bit Manipulation ,Trie ,Array |
Hard | |
1708 | Largest Subarray Length K | Greedy ,Array |
Easy | 🔒 |
1709 | Biggest Window Between Visits | Database |
Medium | 🔒 |
1714 | Sum Of Special Evenly-Spaced Elements In Array | Array ,Dynamic Programming |
Hard | 🔒 |
1715 | Count Apples and Oranges | Database |
Medium | 🔒 |
1716 | Calculate Money in Leetcode Bank | Math |
Easy | |
1717 | Maximum Score From Removing Substrings | Stack ,Greedy ,String |
Medium | |
1718 | Construct the Lexicographically Largest Valid Sequence | Array ,Backtracking |
Medium | |
1719 | Number Of Ways To Reconstruct A Tree | Tree ,Graph ,Topological Sort |
Hard | |
1720 | Decode XORed Array | Bit Manipulation ,Array |
Easy | |
1721 | Swapping Nodes in a Linked List | Linked List ,Two Pointers |
Medium | |
1722 | Minimize Hamming Distance After Swap Operations | Depth-First Search ,Union Find ,Array |
Medium | |
1724 | Checking Existence of Edge Length Limited Paths II | Union Find ,Graph ,Minimum Spanning Tree |
Hard | 🔒 |
1725 | Number Of Rectangles That Can Form The Largest Square | Array |
Easy | |
1726 | Tuple with Same Product | Array ,Hash Table |
Medium | |
1727 | Largest Submatrix With Rearrangements | Greedy ,Array ,Matrix ,Sorting |
Medium | |
1729 | Find Followers Count | Database |
Easy | 🔒 |
1730 | Shortest Path to Get Food | Breadth-First Search ,Array ,Matrix |
Medium | 🔒 |
1731 | The Number of Employees Which Report to Each Employee | Database |
Easy | 🔒 |
1733 | Minimum Number of People to Teach | Greedy ,Array |
Medium | |
1734 | Decode XORed Permutation | Bit Manipulation ,Array |
Medium | |
1735 | Count Ways to Make Array With Product | Array ,Math ,Dynamic Programming |
Hard | |
1736 | Latest Time by Replacing Hidden Digits | String |
Easy | |
1737 | Change Minimum Characters to Satisfy One of Three Conditions | Hash Table ,String ,Counting ,Prefix Sum |
Medium | |
1738 | Find Kth Largest XOR Coordinate Value | Bit Manipulation ,Array ,Divide and Conquer ,Matrix ,Prefix Sum ,Quickselect ,Heap (Priority Queue) |
Medium | |
1739 | Building Boxes | Greedy ,Math ,Binary Search |
Hard | |
1740 | Find Distance in a Binary Tree | Tree ,Depth-First Search ,Breadth-First Search ,Hash Table ,Binary Tree |
Medium | 🔒 |
1742 | Maximum Number of Balls in a Box | Hash Table ,Math ,Counting |
Easy | |
1743 | Restore the Array From Adjacent Pairs | Array ,Hash Table |
Medium | |
1744 | Can You Eat Your Favorite Candy on Your Favorite Day | Array ,Prefix Sum |
Medium | |
1745 | Palindrome Partitioning IV | String ,Dynamic Programming |
Hard | |
1747 | Leetflex Banned Accounts | Database |
Medium | 🔒 |
1748 | Sum of Unique Elements | Array ,Hash Table ,Counting |
Easy | |
1749 | Maximum Absolute Sum of Any Subarray | Array ,Dynamic Programming |
Medium | |
1750 | Minimum Length of String After Deleting Similar Ends | Two Pointers ,String |
Medium | |
1751 | Maximum Number of Events That Can Be Attended II | Array ,Binary Search ,Dynamic Programming |
Hard | |
1752 | Check if Array Is Sorted and Rotated | Array |
Easy | |
1753 | Maximum Score From Removing Stones | Greedy ,Math ,Heap (Priority Queue) |
Medium | |
1754 | Largest Merge Of Two Strings | Greedy ,Two Pointers ,String |
Medium | |
1755 | Closest Subsequence Sum | Bit Manipulation ,Array ,Two Pointers ,Dynamic Programming ,Bitmask |
Hard | |
1756 | Design Most Recently Used Queue | Stack ,Design ,Binary Indexed Tree ,Array ,Hash Table ,Ordered Set |
Medium | 🔒 |
1757 | Recyclable and Low Fat Products | Database |
Easy | 🔒 |
1758 | Minimum Changes To Make Alternating Binary String | String |
Easy | |
1759 | Count Number of Homogenous Substrings | Math ,String |
Medium | |
1760 | Minimum Limit of Balls in a Bag | Array ,Binary Search |
Medium | |
1761 | Minimum Degree of a Connected Trio in a Graph | Graph |
Hard | |
1762 | Buildings With an Ocean View | Stack ,Array ,Monotonic Stack |
Medium | 🔒 |
1763 | Longest Nice Substring | Bit Manipulation ,Hash Table ,String ,Sliding Window |
Easy | |
1764 | Form Array by Concatenating Subarrays of Another Array | Greedy ,Array ,String Matching |
Medium | |
1765 | Map of Highest Peak | Breadth-First Search ,Array ,Matrix |
Medium | |
1766 | Tree of Coprimes | Tree ,Depth-First Search ,Breadth-First Search ,Math |
Hard | |
1767 | Find the Subtasks That Did Not Execute | Database |
Hard | 🔒 |
1769 | Minimum Number of Operations to Move All Balls to Each Box | Array ,String |
Medium | |
1772 | Sort Features by Popularity | Array ,Hash Table ,String ,Sorting |
Medium | 🔒 |
1773 | Count Items Matching a Rule | Array ,String |
Easy | |
1774 | Closest Dessert Cost | Array ,Dynamic Programming ,Backtracking |
Medium | |
1775 | Equal Sum Arrays With Minimum Number of Operations | Greedy ,Array ,Hash Table ,Counting |
Medium | |
1776 | Car Fleet II | Stack ,Array ,Math ,Monotonic Stack ,Heap (Priority Queue) |
Hard | |
1777 | Product's Price for Each Store | Database |
Easy | 🔒 |
1778 | Shortest Path in a Hidden Grid | Depth-First Search ,Breadth-First Search ,Graph ,Interactive |
Medium | 🔒 |
1783 | Grand Slam Titles | Database |
Medium | 🔒 |
1784 | Check if Binary String Has at Most One Segment of Ones | String |
Easy | |
1785 | Minimum Elements to Add to Form a Given Sum | Greedy ,Array |
Medium | |
1786 | Number of Restricted Paths From First to Last Node | Graph ,Topological Sort ,Dynamic Programming ,Shortest Path ,Heap (Priority Queue) |
Medium | |
1787 | Make the XOR of All Segments Equal to Zero | Bit Manipulation ,Array ,Dynamic Programming |
Hard | |
1788 | Maximize the Beauty of the Garden | Greedy ,Array ,Prefix Sum |
Hard | 🔒 |
1790 | Check if One String Swap Can Make Strings Equal | Hash Table ,String ,Counting |
Easy | |
1791 | Find Center of Star Graph | Graph |
Easy | |
1792 | Maximum Average Pass Ratio | Greedy ,Array ,Heap (Priority Queue) |
Medium | |
1793 | Maximum Score of a Good Subarray | Stack ,Array ,Two Pointers ,Binary Search ,Monotonic Stack |
Hard | |
1796 | Second Largest Digit in a String | Hash Table ,String |
Easy | |
1797 | Design Authentication Manager | Design ,Hash Table |
Medium | |
1798 | Maximum Number of Consecutive Values You Can Make | Greedy ,Array |
Medium | |
1799 | Maximize Score After N Operations | Bit Manipulation ,Array ,Math ,Dynamic Programming ,Backtracking ,Bitmask ,Number Theory |
Hard | |
1800 | Maximum Ascending Subarray Sum | Array |
Easy | |
1801 | Number of Orders in the Backlog | Array ,Simulation ,Heap (Priority Queue) |
Medium | |
1802 | Maximum Value at a Given Index in a Bounded Array | Greedy ,Binary Search |
Medium | |
1803 | Count Pairs With XOR in a Range | Bit Manipulation ,Trie ,Array |
Hard | |
1805 | Number of Different Integers in a String | Hash Table ,String |
Easy | |
1806 | Minimum Number of Operations to Reinitialize a Permutation | Array ,Math ,Simulation |
Medium | |
1807 | Evaluate the Bracket Pairs of a String | Array ,Hash Table ,String |
Medium | |
1808 | Maximize Number of Nice Divisors | Recursion ,Math |
Hard | |
1812 | Determine Color of a Chessboard Square | Math ,String |
Easy | |
1813 | Sentence Similarity III | Array ,Two Pointers ,String |
Medium | |
1814 | Count Nice Pairs in an Array | Array ,Hash Table ,Math ,Counting |
Medium | |
1815 | Maximum Number of Groups Getting Fresh Donuts | Bit Manipulation ,Memoization ,Array ,Dynamic Programming ,Bitmask |
Hard | |
1827 | Minimum Operations to Make the Array Increasing | Greedy ,Array |
Easy | |
1828 | Queries on Number of Points Inside a Circle | Geometry ,Array ,Math |
Medium | |
1830 | Minimum Number of Operations to Make String Sorted | Math ,String ,Combinatorics |
Hard | |
1839 | Longest Substring Of All Vowels in Order | String ,Sliding Window |
Medium | |
1852 | Distinct Numbers in Each Subarray | Array ,Hash Table ,Sliding Window |
Medium | 🔒 |
1853 | Convert Date Format | Database |
Easy | 🔒 |
1858 | Longest Word With All Prefixes | Depth-First Search ,Trie |
Medium | 🔒 |
1867 | Orders With Maximum Quantity Above Average | Database |
Medium | 🔒 |
1868 | Product of Two Run-Length Encoded Arrays | Array ,Two Pointers |
Medium | 🔒 |
1871 | Jump Game VII | Two Pointers ,String ,Prefix Sum |
Medium | |
1872 | Stone Game VIII | Array ,Math ,Dynamic Programming ,Game Theory ,Prefix Sum |
Hard | |
1873 | Calculate Special Bonus | Database |
Easy | 🔒 |
1874 | Minimize Product Sum of Two Arrays | Greedy ,Array ,Sorting |
Medium | 🔒 |
1875 | Group Employees of the Same Salary | Database |
Medium | 🔒 |
1880 | Check if Word Equals Summation of Two Words | String |
Easy | |
1881 | Maximum Value after Insertion | Greedy ,String |
Medium | |
1882 | Process Tasks Using Servers | Array ,Heap (Priority Queue) |
Medium | |
1883 | Minimum Skips to Arrive at Meeting On Time | Array ,Dynamic Programming |
Hard | |
1884 | Egg Drop With 2 Eggs and N Floors | Math ,Dynamic Programming |
Medium | |
1885 | Count Pairs in Two Arrays | Array ,Binary Search ,Sorting |
Medium | 🔒 |
1886 | Determine Whether Matrix Can Be Obtained By Rotation | Array ,Matrix |
Easy | |
1887 | Reduction Operations to Make the Array Elements Equal | Array ,Sorting |
Medium | |
1888 | Minimum Number of Flips to Make the Binary String Alternating | Greedy ,String |
Medium | |
1889 | Minimum Space Wasted From Packaging | Array ,Binary Search ,Prefix Sum ,Sorting |
Hard | |
1890 | The Latest Login in 2020 | Database |
Easy | 🔒 |
1891 | Cutting Ribbons | Array ,Binary Search |
Medium | 🔒 |
1892 | Page Recommendations II | Database |
Hard | 🔒 |
1893 | Check if All the Integers in a Range Are Covered | Array ,Hash Table ,Prefix Sum |
Easy | |
1894 | Find the Student that Will Replace the Chalk | Array ,Binary Search ,Prefix Sum ,Simulation |
Medium | |
1895 | Largest Magic Square | Array ,Matrix ,Prefix Sum |
Medium | |
1896 | Minimum Cost to Change the Final Value of Expression | Stack ,Math ,String ,Dynamic Programming |
Hard | |
1897 | Redistribute Characters to Make All Strings Equal | Hash Table ,String ,Counting |
Easy | |
1898 | Maximum Number of Removable Characters | Array ,String ,Binary Search |
Medium | |
1899 | Merge Triplets to Form Target Triplet | Greedy ,Array |
Medium | |
1900 | The Earliest and Latest Rounds Where Players Compete | Memoization ,Dynamic Programming |
Hard | |
1901 | Find a Peak Element II | Array ,Binary Search ,Divide and Conquer ,Matrix |
Medium | |
1902 | Depth of BST Given Insertion Order | Tree ,Binary Search Tree ,Binary Tree ,Ordered Set |
Medium | 🔒 |
1903 | Largest Odd Number in String | Greedy ,Math ,String |
Easy | |
1904 | The Number of Full Rounds You Have Played | Math ,String |
Medium | |
1905 | Count Sub Islands | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Matrix |
Medium | |
1906 | Minimum Absolute Difference Queries | Array ,Hash Table |
Medium | |
1907 | Count Salary Categories | Database |
Medium | 🔒 |
1908 | Game of Nim | Bit Manipulation ,Brainteaser ,Array ,Math ,Dynamic Programming ,Game Theory |
Medium | 🔒 |
1909 | Remove One Element to Make the Array Strictly Increasing | Array |
Easy | |
1910 | Remove All Occurrences of a Substring | String |
Medium | |
1911 | Maximum Alternating Subsequence Sum | Array ,Dynamic Programming |
Medium | |
1912 | Design Movie Rental System | Design ,Array ,Hash Table ,Ordered Set ,Heap (Priority Queue) |
Hard | |
1913 | Maximum Product Difference Between Two Pairs | Array ,Sorting |
Easy | |
1914 | Cyclically Rotating a Grid | Array ,Matrix ,Simulation |
Medium | |
1915 | Number of Wonderful Substrings | Bit Manipulation ,Hash Table ,String ,Prefix Sum |
Medium | |
1916 | Count Ways to Build Rooms in an Ant Colony | Tree ,Graph ,Topological Sort ,Math ,Dynamic Programming ,Combinatorics |
Hard | |
1917 | Leetcodify Friends Recommendations | Database |
Hard | 🔒 |
1918 | Kth Smallest Subarray Sum | Array ,Binary Search ,Sliding Window |
Medium | 🔒 |
1919 | Leetcodify Similar Friends | Hard | 🔒 | |
1920 | Build Array from Permutation | Array ,Simulation |
Easy | |
1921 | Eliminate Maximum Number of Monsters | Greedy ,Array ,Sorting |
Medium | |
1922 | Count Good Numbers | Recursion ,Math |
Medium | |
1923 | Longest Common Subpath | Array ,Binary Search ,Suffix Array ,Hash Function ,Rolling Hash |
Hard | |
1924 | Erect the Fence II | Geometry ,Array ,Math |
Hard | 🔒 |
1925 | Count Square Sum Triples | Math ,Enumeration |
Easy | |
1926 | Nearest Exit from Entrance in Maze | Breadth-First Search ,Array ,Matrix |
Medium | |
1927 | Sum Game | Greedy ,Math ,Game Theory |
Medium | |
1928 | Minimum Cost to Reach Destination in Time | Graph ,Dynamic Programming |
Hard | |
1929 | Concatenation of Array | Array |
Easy | |
1930 | Unique Length-3 Palindromic Subsequences | Hash Table ,String ,Prefix Sum |
Medium | |
1931 | Painting a Grid With Three Different Colors | Dynamic Programming |
Hard | |
1932 | Merge BSTs to Create Single BST | Tree ,Depth-First Search ,Hash Table ,Binary Search ,Binary Tree |
Hard | |
1933 | Check if String Is Decomposable Into Value-Equal Substrings | String |
Easy | 🔒 |
1934 | Confirmation Rate | Medium | 🔒 | |
1935 | Maximum Number of Words You Can Type | Hash Table ,String |
Easy | |
1936 | Add Minimum Number of Rungs | Medium | ||
1937 | Maximum Number of Points with Cost | Medium | ||
1938 | Maximum Genetic Difference Query | Hard | ||
1939 | Users That Actively Request Confirmation Messages | Easy | 🔒 | |
1940 | Longest Common Subsequence Between Sorted Arrays | Array ,Hash Table ,Counting |
Medium | 🔒 |
1941 | Check if All Characters Have Equal Number of Occurrences | Hash Table ,String ,Counting |
Easy | |
1942 | The Number of the Smallest Unoccupied Chair | Array ,Ordered Set ,Heap (Priority Queue) |
Medium | |
1943 | Describe the Painting | Array ,Prefix Sum |
Medium | |
1944 | Number of Visible People in a Queue | Stack ,Array ,Monotonic Stack |
Hard | |
1945 | Sum of Digits of String After Convert | String ,Simulation |
Easy | |
1946 | Largest Number After Mutating Substring | Greedy ,Array ,String |
Medium | |
1947 | Maximum Compatibility Score Sum | Bit Manipulation ,Array ,Dynamic Programming ,Backtracking ,Bitmask |
Medium | |
1948 | Delete Duplicate Folders in System | Trie ,Array ,Hash Table ,String ,Hash Function |
Hard | |
1949 | Strong Friendship | Medium | 🔒 | |
1950 | Maximum of Minimum Values in All Subarrays | Medium | 🔒 | |
1951 | All the Pairs With the Maximum Number of Common Followers | Medium | 🔒 | |
1952 | Three Divisors | Math |
Easy | |
1953 | Maximum Number of Weeks for Which You Can Work | Greedy ,Array |
Medium | |
1954 | Minimum Garden Perimeter to Collect Enough Apples | Math ,Binary Search |
Medium | |
1955 | Count Number of Special Subsequences | Array ,Dynamic Programming |
Hard | |
1956 | Minimum Time For K Virus Variants to Spread | Geometry ,Array ,Math ,Binary Search ,Enumeration |
Hard | 🔒 |
1957 | Delete Characters to Make Fancy String | String |
Easy | |
1958 | Check if Move is Legal | Array ,Enumeration ,Matrix |
Medium | |
1959 | Minimum Total Space Wasted With K Resizing Operations | Array ,Dynamic Programming |
Medium | |
1961 | Check If String Is a Prefix of Array | Array ,String |
Easy | |
1962 | Remove Stones to Minimize the Total | Array ,Heap (Priority Queue) |
Medium | |
1963 | Minimum Number of Swaps to Make the String Balanced | Stack ,Greedy ,Two Pointers ,String |
Medium | |
1964 | Find the Longest Valid Obstacle Course at Each Position | Binary Indexed Tree ,Array ,Binary Search |
Hard | |
1965 | Employees With Missing Information | Easy | 🔒 | |
1966 | Binary Searchable Numbers in an Unsorted Array | Medium | 🔒 | |
1967 | Number of Strings That Appear as Substrings in Word | String |
Easy | |
1968 | Array With Elements Not Equal to Average of Neighbors | Greedy ,Array ,Sorting |
Medium | |
1969 | Minimum Non-Zero Product of the Array Elements | Greedy ,Recursion ,Math |
Medium | |
1970 | Last Day Where You Can Still Cross | Depth-First Search ,Breadth-First Search ,Union Find ,Array ,Binary Search ,Matrix |
Hard | |
1971 | Find if Path Exists in Graph | Depth-First Search ,Breadth-First Search ,Graph |
Easy | |
1972 | First and Last Call On the Same Day | Hard | 🔒 | |
1973 | Count Nodes Equal to Sum of Descendants | Medium | 🔒 | |
1974 | Minimum Time to Type Word Using Special Typewriter | Greedy ,String |
Easy | |
1975 | Maximum Matrix Sum | Greedy ,Array ,Matrix |
Medium | |
1976 | Number of Ways to Arrive at Destination | Graph ,Topological Sort ,Dynamic Programming ,Shortest Path |
Medium | |
1977 | Number of Ways to Separate Numbers | String ,Dynamic Programming ,Suffix Array |
Hard | |
1978 | Employees Whose Manager Left the Company | Easy | 🔒 | |
1979 | Find Greatest Common Divisor of Array | Array ,Math |
Easy | |
1980 | Find Unique Binary String | Array ,String ,Backtracking |
Medium | |
1981 | Minimize the Difference Between Target and Chosen Elements | Array ,Dynamic Programming ,Matrix |
Medium | |
1982 | Find Array Given Subset Sums | Array ,Divide and Conquer |
Hard | |
1983 | Widest Pair of Indices With Equal Range Sum | Medium | 🔒 | |
1984 | Minimum Difference Between Highest and Lowest of K Scores | Array ,Sorting |
Easy | |
1985 | Find the Kth Largest Integer in the Array | Array ,String ,Divide and Conquer ,Quickselect ,Sorting ,Heap (Priority Queue) |
Medium | |
1986 | Minimum Number of Work Sessions to Finish the Tasks | Bit Manipulation ,Array ,Dynamic Programming ,Backtracking ,Bitmask |
Medium | |
1987 | Number of Unique Good Subsequences | String ,Dynamic Programming |
Hard | |
1988 | Find Cutoff Score for Each School | Medium | 🔒 | |
1990 | Count the Number of Experiments | Easy | 🔒 | |
1991 | Find the Middle Index in Array | Array ,Prefix Sum |
Easy | |
1992 | Find All Groups of Farmland | Depth-First Search ,Breadth-First Search ,Array ,Matrix |
Medium | |
1993 | Operations on Tree | Tree ,Breadth-First Search ,Design ,Hash Table |
Medium | |
1994 | The Number of Good Subsets | Bit Manipulation ,Array ,Math ,Dynamic Programming ,Bitmask |
Hard | |
1995 | Count Special Quadruplets | Array ,Enumeration |
Easy | |
1996 | The Number of Weak Characters in the Game | Stack ,Greedy ,Array ,Sorting ,Monotonic Stack |
Medium | |
1997 | First Day Where You Have Been in All the Rooms | Array ,Dynamic Programming |
Medium | |
1998 | GCD Sort of an Array | Union Find ,Array ,Math ,Sorting |
Hard | |
1999 | Smallest Greater Multiple Made of Two Digits | Medium | 🔒 | |
2000 | Reverse Prefix of Word | Two Pointers ,String |
Easy | |
2001 | Number of Pairs of Interchangeable Rectangles | Array ,Hash Table ,Math ,Counting ,Number Theory |
Medium | |
2002 | Maximum Product of the Length of Two Palindromic Subsequences | Bit Manipulation ,String ,Dynamic Programming ,Backtracking ,Bitmask |
Medium | |
2003 | Smallest Missing Genetic Value in Each Subtree | Tree ,Depth-First Search ,Union Find ,Dynamic Programming |
Hard | |
2004 | The Number of Seniors and Juniors to Join the Company | Hard | 🔒 | |
2005 | Subtree Removal Game with Fibonacci Tree | Hard | 🔒 | |
2006 | Count Number of Pairs With Absolute Difference K | Array |
Easy | |
2007 | Find Original Array From Doubled Array | Greedy ,Array ,Hash Table ,Sorting |
Medium | |
2008 | Maximum Earnings From Taxi | Array ,Binary Search ,Dynamic Programming ,Sorting |
Medium | |
2009 | Minimum Number of Operations to Make Array Continuous | Array ,Binary Search |
Hard | |
2010 | The Number of Seniors and Juniors to Join the Company II | Hard | 🔒 | |
2011 | Final Value of Variable After Performing Operations | Array ,String ,Simulation |
Easy | |
2012 | Sum of Beauty in the Array | Array |
Medium | |
2013 | Detect Squares | Design ,Array ,Hash Table ,Counting |
Medium | |
2014 | Longest Subsequence Repeated k Times | Greedy ,String ,Backtracking ,Counting ,Enumeration |
Hard | |
2015 | Average Height of Buildings in Each Segment | Medium | 🔒 | |
2016 | Maximum Difference Between Increasing Elements | Easy | ||
2017 | Grid Game | Medium | ||
2018 | Check if Word Can Be Placed In Crossword | Medium | ||
2019 | The Score of Students Solving Math Expression | Hard |