| 2 |
Add Two Numbers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 7 |
Reverse Integer |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 9 |
Palindrome Number |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 11 |
Container With Most Water |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 21 |
Merge Two Sorted Lists |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 23 |
Merge k Sorted Lists |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 24 |
Swap Nodes in Pairs |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 25 |
Reverse Nodes in k-Group |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 29 |
Divide Two Integers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 42 |
Trapping Rain Water |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 43 |
Multiply Strings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 45 |
Jump Game II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 53 |
Maximum Subarray |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 54 |
Spiral Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 59 |
Spiral Matrix II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 61 |
Rotate List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 64 |
Minimum Path Sum |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 69 |
Sqrt(x) |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 74 |
Search a 2D Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 75 |
Sort Colors |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 80 |
Remove Duplicates from Sorted Array II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 82 |
Remove Duplicates from Sorted List II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 83 |
Remove Duplicates from Sorted List |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 85 |
Maximal Rectangle |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 86 |
Partition List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 92 |
Reverse Linked List II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 102 |
Binary Tree Level Order Traversal |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 103 |
Binary Tree Zigzag Level Order Traversal |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 125 |
Valid Palindrome |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 130 |
Surrounded Regions |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 131 |
Palindrome Partitioning |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 132 |
Palindrome Partitioning II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 134 |
Gas Station |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 135 |
Candy |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 138 |
Copy List with Random Pointer |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 147 |
Insertion Sort List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 160 |
Intersection of Two Linked Lists |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 167 |
Two Sum II - Input Array Is Sorted |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 188 |
Best Time to Buy and Sell Stock IV |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 189 |
Rotate Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 190 |
Reverse Bits |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 200 |
Number of Islands |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 201 |
Bitwise AND of Numbers Range |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 203 |
Remove Linked List Elements |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 206 |
Reverse Linked List |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 207 |
Course Schedule |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 214 |
Shortest Palindrome |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 215 |
Kth Largest Element in an Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 222 |
Count Complete Tree Nodes |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 227 |
Basic Calculator II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 228 |
Summary Ranges |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 233 |
Number of Digit One |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 237 |
Delete Node in a Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 240 |
Search a 2D Matrix II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 275 |
H-Index II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 278 |
First Bad Version |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 295 |
Find Median from Data Stream |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 303 |
Range Sum Query - Immutable |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 306 |
Additive Number |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 307 |
Range Sum Query - Mutable |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 315 |
Count of Smaller Numbers After Self |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 321 |
Create Maximum Number |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 324 |
Wiggle Sort II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 327 |
Count of Range Sum |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 328 |
Odd Even Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 336 |
Palindrome Pairs |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 341 |
Flatten Nested List Iterator |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 344 |
Reverse String |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 345 |
Reverse Vowels of a String |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 349 |
Intersection of Two Arrays |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 350 |
Intersection of Two Arrays II |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 354 |
Russian Doll Envelopes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 363 |
Max Sum of Rectangle No Larger Than K |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 367 |
Valid Perfect Square |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 373 |
Find K Pairs with Smallest Sums |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 374 |
Guess Number Higher or Lower |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 378 |
Kth Smallest Element in a Sorted Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 380 |
Insert Delete GetRandom O(1) |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 381 |
Insert Delete GetRandom O(1) - Duplicates allowed |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 382 |
Linked List Random Node |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 386 |
Lexicographical Numbers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 394 |
Decode String |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 409 |
Longest Palindrome |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 419 |
Battleships in a Board |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 420 |
Strong Password Checker |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 427 |
Construct Quad Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 430 |
Flatten a Multilevel Doubly Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 441 |
Arranging Coins |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 442 |
Find All Duplicates in an Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 445 |
Add Two Numbers II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 454 |
4Sum II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 456 |
132 Pattern |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 475 |
Heaters |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 479 |
Largest Palindrome Product |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 481 |
Magical String |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 488 |
Zuma Game |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 491 |
Non-decreasing Subsequences |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 493 |
Reverse Pairs |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 498 |
Diagonal Traverse |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 502 |
IPO |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 503 |
Next Greater Element II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 517 |
Super Washing Machines |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 519 |
Random Flip Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 528 |
Random Pick with Weight |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 541 |
Reverse String II |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 542 |
01 Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 556 |
Next Greater Element III |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 564 |
Find the Closest Palindrome |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 581 |
Shortest Unsorted Continuous Subarray |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 587 |
Erect the Fence |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 591 |
Tag Validator |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 605 |
Can Place Flowers |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 611 |
Valid Triangle Number |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 632 |
Smallest Range Covering Elements from K Lists |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 654 |
Maximum Binary Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 658 |
Find K Closest Elements |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 662 |
Maximum Width of Binary Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 671 |
Second Minimum Node In a Binary Tree |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 678 |
Valid Parenthesis String |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 679 |
24 Game |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 680 |
Valid Palindrome II |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 691 |
Stickers to Spell Word |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 693 |
Binary Number with Alternating Bits |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 707 |
Design Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 713 |
Subarray Product Less Than K |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 715 |
Range Module |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 722 |
Remove Comments |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 724 |
Find Pivot Index |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 725 |
Split Linked List in Parts |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 729 |
My Calendar I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 731 |
My Calendar II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 749 |
Contain Virus |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 753 |
Cracking the Safe |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 762 |
Prime Number of Set Bits in Binary Representation |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 777 |
Swap Adjacent in LR String |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 794 |
Valid Tic-Tac-Toe State |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 817 |
Linked List Components |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 829 |
Consecutive Numbers Sum |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 830 |
Positions of Large Groups |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 842 |
Split Array into Fibonacci Sequence |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 845 |
Longest Mountain in Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 847 |
Shortest Path Visiting All Nodes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 855 |
Exam Room |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 859 |
Buddy Strings |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 864 |
Shortest Path to Get All Keys |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 865 |
Smallest Subtree with all the Deepest Nodes |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 866 |
Prime Palindrome |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 873 |
Length of Longest Fibonacci Subsequence |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 875 |
Koko Eating Bananas |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 882 |
Reachable Nodes In Subdivided Graph |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 885 |
Spiral Matrix III |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 887 |
Super Egg Drop |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 902 |
Numbers At Most N Given Digit Set |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 906 |
Super Palindromes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 907 |
Sum of Subarray Minimums |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 917 |
Reverse Only Letters |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 923 |
3Sum With Multiplicity |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 934 |
Shortest Bridge |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 941 |
Valid Mountain Array |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 943 |
Find the Shortest Superstring |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 962 |
Maximum Width Ramp |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 967 |
Numbers With Same Consecutive Differences |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 971 |
Flip Binary Tree To Match Preorder Traversal |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 975 |
Odd Even Jump |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 988 |
Smallest String Starting From Leaf |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 992 |
Subarrays with K Different Integers |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 995 |
Minimum Number of K Consecutive Bit Flips |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1004 |
Max Consecutive Ones III |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1019 |
Next Greater Node In Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1020 |
Number of Enclaves |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1026 |
Maximum Difference Between Node and Ancestor |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1034 |
Coloring A Border |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1036 |
Escape a Large Maze |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1042 |
Flower Planting With No Adjacent |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1044 |
Longest Duplicate Substring |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1061 |
Lexicographically Smallest Equivalent String |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1071 |
Greatest Common Divisor of Strings |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1080 |
Insufficient Nodes in Root to Leaf Paths |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1091 |
Shortest Path in Binary Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1110 |
Delete Nodes And Return Forest |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1116 |
Print Zero Even Odd |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1130 |
Minimum Cost Tree From Leaf Values |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1138 |
Alphabet Board Path |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1139 |
Largest 1-Bordered Square |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1146 |
Snapshot Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1147 |
Longest Chunked Palindrome Decomposition |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1162 |
As Far from Land as Possible |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1169 |
Invalid Transactions |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1172 |
Dinner Plate Stacks |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1177 |
Can Make Palindrome from Substring |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1210 |
Minimum Moves to Reach Target with Rotations |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1222 |
Queens That Can Attack the King |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1235 |
Maximum Profit in Job Scheduling |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1237 |
Find Positive Integer Solution for a Given Equation |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1239 |
Maximum Length of a Concatenated String with Unique Characters |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1240 |
Tiling a Rectangle with the Fewest Squares |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1252 |
Cells with Odd Values in a Matrix |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1253 |
Reconstruct a 2-Row Binary Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1254 |
Number of Closed Islands |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1255 |
Maximum Score Words Formed by Letters |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1263 |
Minimum Moves to Move a Box to Their Target Location |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1278 |
Palindrome Partitioning III |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1284 |
Minimum Number of Flips to Convert Binary Matrix to Zero Matrix |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1293 |
Shortest Path in a Grid with Obstacles Elimination |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1299 |
Replace Elements with Greatest Element on Right Side |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1309 |
Decrypt String from Alphabet to Integer Mapping |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1312 |
Minimum Insertion Steps to Make a String Palindrome |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1324 |
Print Words Vertically |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1328 |
Break a Palindrome |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1329 |
Sort the Matrix Diagonally |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1354 |
Construct Target Array With Multiple Sums |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1368 |
Minimum Cost to Make at Least One Valid Path in a Grid |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1370 |
Increasing Decreasing String |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1380 |
Lucky Numbers in a Matrix |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1381 |
Design a Stack With Increment Operation |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1391 |
Check if There is a Valid Path in a Grid |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1395 |
Count Number of Teams |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1397 |
Find All Good Strings |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1400 |
Construct K Palindrome Strings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1405 |
Longest Happy String |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1417 |
Reformat The String |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1452 |
People Whose List of Favorite Companies Is Not a Subset of Another List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1457 |
Pseudo-Palindromic Paths in a Binary Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1472 |
Design Browser History |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1493 |
Longest Subarray of 1's After Deleting One Element |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1498 |
Number of Subsequences That Satisfy the Given Sum Condition |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1519 |
Number of Nodes in the Sub-Tree With the Same Label |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1530 |
Number of Good Leaf Nodes Pairs |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1531 |
String Compression II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1536 |
Minimum Swaps to Arrange a Binary Grid |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1539 |
Kth Missing Positive Number |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1557 |
Minimum Number of Vertices to Reach All Nodes |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1560 |
Most Visited Sector in a Circular Track |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1568 |
Minimum Number of Days to Disconnect Island |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1574 |
Shortest Subarray to be Removed to Make Array Sorted |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1575 |
Count All Possible Routes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1576 |
Replace All ?'s to Avoid Consecutive Repeating Characters |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1583 |
Count Unhappy Friends |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1585 |
Check If String Is Transformable With Substring Sort Operations |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1591 |
Strange Printer II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1593 |
Split a String Into the Max Number of Unique Substrings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1606 |
Find Servers That Handled Most Number of Requests |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1609 |
Even Odd Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1616 |
Split Two Strings to Make Palindrome |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1619 |
Mean of Array After Removing Some Elements |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1625 |
Lexicographically Smallest String After Applying Operations |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1629 |
Slowest Key |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1637 |
Widest Vertical Area Between Two Points Containing No Points |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1638 |
Count Substrings That Differ by One Character |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1643 |
Kth Smallest Instructions |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1654 |
Minimum Jumps to Reach Home |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1670 |
Design Front Middle Back Queue |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1673 |
Find the Most Competitive Subsequence |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1679 |
Max Number of K-Sum Pairs |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1684 |
Count the Number of Consistent Strings |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1685 |
Sum of Absolute Differences in a Sorted Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1703 |
Minimum Adjacent Swaps for K Consecutive Ones |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1706 |
Where Will the Ball Fall |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1707 |
Maximum XOR With an Element From Array |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1710 |
Maximum Units on a Truck |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1712 |
Ways to Split Array Into Three Subarrays |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1717 |
Maximum Score From Removing Substrings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1721 |
Swapping Nodes in a Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1728 |
Cat and Mouse II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1735 |
Count Ways to Make Array With Product |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1742 |
Maximum Number of Balls in a Box |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1745 |
Palindrome Partitioning IV |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1754 |
Largest Merge Of Two Strings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1763 |
Longest Nice Substring |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1765 |
Map of Highest Peak |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1771 |
Maximize Palindrome Length From Subsequences |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1775 |
Equal Sum Arrays With Minimum Number of Operations |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1776 |
Car Fleet II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1782 |
Count Pairs Of Nodes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1786 |
Number of Restricted Paths From First to Last Node |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1793 |
Maximum Score of a Good Subarray |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1800 |
Maximum Ascending Subarray Sum |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1802 |
Maximum Value at a Given Index in a Bounded Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1803 |
Count Pairs With XOR in a Range |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1818 |
Minimum Absolute Sum Difference |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1828 |
Queries on Number of Points Inside a Circle |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1845 |
Seat Reservation Manager |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1847 |
Closest Room |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1848 |
Minimum Distance to the Target Element |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1850 |
Minimum Adjacent Swaps to Reach the Kth Smallest Number |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1855 |
Maximum Distance Between a Pair of Values |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1856 |
Maximum Subarray Min-Product |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1862 |
Sum of Floored Pairs |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1881 |
Maximum Value after Insertion |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1882 |
Process Tasks Using Servers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1888 |
Minimum Number of Flips to Make the Binary String Alternating |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1889 |
Minimum Space Wasted From Packaging |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1893 |
Check if All the Integers in a Range Are Covered |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1896 |
Minimum Cost to Change the Final Value of Expression |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1904 |
The Number of Full Rounds You Have Played |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1905 |
Count Sub Islands |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1906 |
Minimum Absolute Difference Queries |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1926 |
Nearest Exit from Entrance in Maze |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1938 |
Maximum Genetic Difference Query |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1942 |
The Number of the Smallest Unoccupied Chair |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1944 |
Number of Visible People in a Queue |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1946 |
Largest Number After Mutating Substring |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1948 |
Delete Duplicate Folders in System |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1960 |
Maximum Product of the Length of Two Palindromic Substrings |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1964 |
Find the Longest Valid Obstacle Course at Each Position |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1967 |
Number of Strings That Appear as Substrings in Word |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1976 |
Number of Ways to Arrive at Destination |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1977 |
Number of Ways to Separate Numbers |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1991 |
Find the Middle Index in Array |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1992 |
Find All Groups of Farmland |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 1994 |
The Number of Good Subsets |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2002 |
Maximum Product of the Length of Two Palindromic Subsequences |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2030 |
Smallest K-Length Subsequence With Occurrences of a Letter |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2035 |
Partition Array Into Two Arrays to Minimize Sum Difference |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2039 |
The Time When the Network Becomes Idle |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2040 |
Kth Smallest Product of Two Sorted Arrays |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2042 |
Check if Numbers Are Ascending in a Sentence |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2045 |
Second Minimum Time to Reach Destination |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2049 |
Count Nodes With the Highest Score |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2050 |
Parallel Courses III |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2055 |
Plates Between Candles |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2058 |
Find the Minimum and Maximum Number of Nodes Between Critical Points |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2059 |
Minimum Operations to Convert Number |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2074 |
Reverse Nodes in Even Length Groups |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2075 |
Decode the Slanted Ciphertext |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2081 |
Sum of k-Mirror Numbers |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2096 |
Step-By-Step Directions From a Binary Tree Node to Another |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2100 |
Find Good Days to Rob the Bank |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2101 |
Detonate the Maximum Bombs |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2106 |
Maximum Fruits Harvested After at Most K Steps |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2108 |
Find First Palindromic String in the Array |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2116 |
Check if a Parentheses String Can Be Valid |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2119 |
A Number After a Double Reversal |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2120 |
Execution of All Suffix Instructions Staying in a Grid |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2127 |
Maximum Employees to Be Invited to a Meeting |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2131 |
Longest Palindrome by Concatenating Two Letter Words |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2134 |
Minimum Swaps to Group All 1's Together II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2135 |
Count Words Obtained After Adding a Letter |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2146 |
K Highest Ranked Items Within a Price Range |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2162 |
Minimum Cost to Set Cooking Time |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2181 |
Merge Nodes in Between Zeros |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2182 |
Construct String With Repeat Limit |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2192 |
All Ancestors of a Node in a Directed Acyclic Graph |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2193 |
Minimum Number of Moves to Make Palindrome |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2212 |
Maximum Points in an Archery Competition |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2232 |
Minimize Result by Adding Parentheses to Expression |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2234 |
Maximum Total Beauty of the Gardens |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2242 |
Maximum Score of a Node Sequence |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2248 |
Intersection of Multiple Arrays |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2251 |
Number of Flowers in Full Bloom |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2256 |
Minimum Average Difference |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2258 |
Escape the Spreading Fire |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2265 |
Count Nodes Equal to Average of Subtree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2267 |
Check if There Is a Valid Parentheses String Path |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2270 |
Number of Ways to Split Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2271 |
Maximum White Tiles Covered by a Carpet |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2281 |
Sum of Total Strength of Wizards |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2285 |
Maximum Total Importance of Roads |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2286 |
Booking Concert Tickets in Groups |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2289 |
Steps to Make Array Non-decreasing |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2290 |
Minimum Obstacle Removal to Reach Corner |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2300 |
Successful Pairs of Spells and Potions |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2316 |
Count Unreachable Pairs of Nodes in an Undirected Graph |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2326 |
Spiral Matrix IV |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2328 |
Number of Increasing Paths in a Grid |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2333 |
Minimum Sum of Squared Difference |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2334 |
Subarray With Elements Greater Than Varying Threshold |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2354 |
Number of Excellent Pairs |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2368 |
Reachable Nodes With Restrictions |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2374 |
Node With Highest Edge Score |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2381 |
Shifting Letters II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2382 |
Maximum Segment Sum After Removals |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2397 |
Maximum Rows Covered by Columns |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2400 |
Number of Ways to Reach a Position After Exactly k Steps |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2402 |
Meeting Rooms III |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2407 |
Longest Increasing Subsequence II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2413 |
Smallest Even Multiple |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2420 |
Find All Good Indices |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2426 |
Number of Pairs Satisfying Inequality |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2429 |
Minimize XOR |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2440 |
Create Components With Same Value |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2454 |
Next Greater Element IV |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2460 |
Apply Operations to an Array |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2462 |
Total Cost to Hire K Workers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2468 |
Split Message Based on Limit |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2472 |
Maximum Number of Non-overlapping Palindrome Substrings |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2487 |
Remove Nodes From Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2493 |
Divide Nodes Into the Maximum Number of Groups |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2497 |
Maximum Star Sum of a Graph |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2500 |
Delete Greatest Value in Each Row |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2508 |
Add Edges to Make Degrees of All Nodes Even |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2516 |
Take K of Each Character From Left and Right |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2523 |
Closest Prime Numbers in Range |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2526 |
Find Consecutive Integers from a Data Stream |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2532 |
Time to Cross a Bridge |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2542 |
Maximum Subsequence Score |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2552 |
Count Increasing Quadruplets |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2562 |
Find the Array Concatenation Value |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2565 |
Subsequence With the Minimum Score |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2573 |
Find the String with LCP |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2589 |
Minimum Time to Complete All Tasks |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2593 |
Find Score of an Array After Marking All Elements |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2595 |
Number of Even and Odd Bits |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2601 |
Prime Subtraction Operation |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2612 |
Minimum Reverse Operations |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2617 |
Minimum Number of Visited Cells in a Grid |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2625 |
Flatten Deeply Nested Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2679 |
Sum in a Matrix |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2697 |
Lexicographically Smallest Palindrome |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2698 |
Find the Punishment Number of an Integer |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2709 |
Greatest Common Divisor Traversal |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2711 |
Difference of Number of Distinct Values on Diagonals |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2721 |
Execute Asynchronous Functions in Parallel |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2736 |
Maximum Sum Queries |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2747 |
Count Zero Request Servers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2751 |
Robot Collisions |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2760 |
Longest Even Odd Subarray With Threshold |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2791 |
Count Paths That Can Form a Palindrome in a Tree |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2807 |
Insert Greatest Common Divisors in Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2812 |
Find the Safest Path in a Grid |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2816 |
Double a Number Represented as a Linked List |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2817 |
Minimum Absolute Difference Between Elements With Constraint |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2830 |
Maximize the Profit as the Salesman |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2835 |
Minimum Operations to Form Subsequence With Target Sum |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2848 |
Points That Intersect With Cars |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2858 |
Minimum Edge Reversals So Every Node Is Reachable |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2874 |
Maximum Value of an Ordered Triplet II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2876 |
Count Visited Nodes in a Directed Graph |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2877 |
Create a DataFrame from List |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2878 |
Get the Size of a DataFrame |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2881 |
Create a New Column |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2904 |
Shortest and Lexicographically Smallest Beautiful String |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2909 |
Minimum Sum of Mountain Triplets II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2911 |
Minimum Changes to Make K Semi-palindromes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2920 |
Maximum Points After Collecting Coins From All Nodes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2926 |
Maximum Balanced Subsequence Sum |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2940 |
Find Building Where Alice and Bob Can Meet |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2961 |
Double Modular Exponentiation |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 2983 |
Palindrome Rearrangement Queries |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3006 |
Find Beautiful Indices in the Given Array I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3008 |
Find Beautiful Indices in the Given Array II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3016 |
Minimum Number of Pushes to Type Word II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3017 |
Count the Number of Houses at a Certain Distance II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3035 |
Maximum Palindromes After Operations |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3066 |
Minimum Operations to Exceed Threshold Value II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3068 |
Find the Maximum Sum of Node Values |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3086 |
Minimum Moves to Pick K Ones |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3090 |
Maximum Length Substring With Two Occurrences |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3108 |
Minimum Cost Walk in Weighted Graph |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3112 |
Minimum Time to Visit Disappearing Nodes |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3113 |
Find the Number of Subarrays Where Boundary Elements Are Maximum |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3117 |
Minimum Sum of Values by Dividing Array |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3128 |
Right Triangles |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3133 |
Minimum Array End |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3143 |
Maximum Points Inside the Square |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3145 |
Find Products of Elements of Big Array |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3161 |
Block Placement Queries |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3187 |
Peaks in Array |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3197 |
Find the Minimum Area to Cover All Ones II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3203 |
Find Minimum Diameter After Merging Two Trees |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3217 |
Delete Nodes From Linked List Present in Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3233 |
Find the Count of Numbers Which Are Not Special |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3235 |
Check if the Rectangle Corner Is Reachable |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3241 |
Time Taken to Mark All Nodes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3244 |
Shortest Distance After Road Addition Queries II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3245 |
Alternating Groups III |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3257 |
Maximum Value Sum by Placing Three Rooks II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3260 |
Find the Largest Palindrome Divisible by K |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3264 |
Final Array State After K Multiplication Operations I |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3266 |
Final Array State After K Multiplication Operations II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3272 |
Find the Count of Good Integers |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3281 |
Maximize Score of Numbers in Ranges |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3283 |
Maximum Number of Moves to Kill All Pawns |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3288 |
Length of the Longest Increasing Path |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3303 |
Find the Occurrence of First Almost Equal Substring |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3311 |
Construct 2D Grid Matching Graph Layout |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3319 |
K-th Largest Perfect Subtree Size in Binary Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3326 |
Minimum Division Operations to Make Array Non Decreasing |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3327 |
Check if DFS Strings Are Palindromes |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3348 |
Smallest Divisible Digit Product II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3352 |
Count K-Reducible Numbers Less Than N |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3357 |
Minimize the Maximum Adjacent Element Difference |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3361 |
Shift Distance Between Two Strings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3362 |
Zero Array Transformation III |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3363 |
Find the Maximum Number of Fruits Collected |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3372 |
Maximize the Number of Target Nodes After Connecting Trees I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3373 |
Maximize the Number of Target Nodes After Connecting Trees II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3380 |
Maximum Area Rectangle With Point Constraints I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3398 |
Smallest Substring With Identical Characters I |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3399 |
Smallest Substring With Identical Characters II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3413 |
Maximum Coins From K Consecutive Bags |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3420 |
Count Non-Decreasing Subarrays After K Operations |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3427 |
Sum of Variable Length Subarrays |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3430 |
Maximum and Minimum Sums of at Most Size K Subarrays |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3438 |
Find Valid Pair of Adjacent Digits in String |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3444 |
Minimum Increments for Target Multiples in an Array |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3453 |
Separate Squares I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3454 |
Separate Squares II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3455 |
Shortest Matching Substring |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3464 |
Maximize the Distance Between Points on a Square |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3494 |
Find the Minimum Amount of Time to Brew Potions |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3499 |
Maximize Active Section with Trade I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3501 |
Maximize Active Section with Trade II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3503 |
Longest Palindrome After Substring Concatenation I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3517 |
Smallest Palindromic Rearrangement I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3518 |
Smallest Palindromic Rearrangement II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3521 |
Find Product Recommendation Pairs |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3529 |
Count Cells in Overlapping Horizontal and Vertical Substrings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3533 |
Concatenated Divisibility |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3534 |
Path Existence Queries in a Graph II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3542 |
Minimum Operations to Convert All Elements to Zero |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3543 |
Maximum Weighted K-Edge Path |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3553 |
Minimum Weighted Subgraph With the Required Paths II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3554 |
Find Category Recommendation Pairs |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3556 |
Sum of Largest Prime Substrings |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3559 |
Number of Ways to Assign Edge Weights II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3575 |
Maximum Good Subtree Score |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3578 |
Count Partitions With Max-Min Difference at Most K |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3580 |
Find Consistently Improving Employees |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3583 |
Count Special Triplets |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3594 |
Minimum Time to Transport All Individuals |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3601 |
Find Drivers with Improved Fuel Efficiency |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3612 |
Process String with Special Operations I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3613 |
Minimize Maximum Component Cost |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3614 |
Process String with Special Operations II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3615 |
Longest Palindromic Path in Graph |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3619 |
Count Islands With Total Value Divisible by K |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3621 |
Number of Integers With Popcount-Depth Equal to K I |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3624 |
Number of Integers With Popcount-Depth Equal to K II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3629 |
Minimum Jumps to Reach End via Prime Teleportation |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3635 |
Earliest Finish Time for Land and Water Rides II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3646 |
Next Special Palindrome Number |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3658 |
GCD of Odd and Even Sums |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3660 |
Jump Game IX |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3661 |
Maximum Walls Destroyed by Robots |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3666 |
Minimum Operations to Equalize Binary String |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3669 |
Balanced K-Factor Decomposition |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3671 |
Sum of Beautiful Subsequences |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3676 |
Count Bowl Subarrays |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3691 |
Maximum Total Subarray Value II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3705 |
Find Golden Hour Customers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3710 |
Maximum Partition Factor |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3716 |
Find Churn Risk Customers |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3742 |
Maximum Path Score in a Grid |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3745 |
Maximize Expression of Three Elements |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3748 |
Count Stable Subarrays |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3754 |
Concatenate Non-Zero Digits and Multiply by Sum I |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3756 |
Concatenate Non-Zero Digits and Multiply by Sum II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3766 |
Minimum Operations to Make Binary Palindrome |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3768 |
Minimum Inversion Count in Subarrays of Fixed Length |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3770 |
Largest Prime from Consecutive Prime Sum |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3801 |
Minimum Cost to Merge Sorted Lists |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3812 |
Minimum Edge Toggles on a Tree |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3820 |
Pythagorean Distance Nodes in a Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3830 |
Longest Alternating Subarray After Removing At Most One Element |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3845 |
Maximum Subarray XOR with Bounded Range |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3867 |
Sum of GCD of Formed Pairs |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3872 |
Longest Arithmetic Sequence After Changing At Most One Element |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3878 |
Count Good Subarrays |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3904 |
Smallest Stable Index II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3910 |
Count Connected Subgraphs with Even Node Sum |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3911 |
K-th Smallest Remaining Even Integer in Subarray Queries |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3918 |
Sum of Primes Between Number and Its Reverse |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3919 |
Minimum Cost to Move Between Indices |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3920 |
Maximize Fixed Points After Deletions |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3925 |
Concatenate Array With Reverse |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3928 |
Minimum Cost to Buy Apples II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3955 |
Valid Binary Strings With Cost Limit |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3956 |
Maximum Sum of M Non-Overlapping Subarrays I |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3970 |
Shortest Path With At Most K Consecutive Identical Characters |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3977 |
Minimum Time to Reach Target With Limited Power |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 3997 |
Count Dominant Nodes in a Binary Tree |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4010 |
Maximize Pair Strength Using GCD |
Easy |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4011 |
Count Subarrays With Even Odd Ratio I |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4013 |
Count Subarrays With Even Odd Ratio II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4017 |
Peaks in Array II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4027 |
Elevator Requests III |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4031 |
Find All Numbers Disappeared in an Array II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4036 |
Lexicographically Largest String After Pair Transformations |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4037 |
Maximum Valid Split Positions II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4045 |
Count Robot Groups |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4046 |
Minimum Cost Path With At Most K Turns |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4051 |
Count Subarrays with Distant Sums |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4053 |
Minimum Operations to Make Every Element Palindromic |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4055 |
Count Shadow Pairs II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4059 |
Lexicographically Largest Power Array |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4064 |
Longest Subarray Divisible by K with At Most One Negation II |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4098 |
Minimize the Maximum Value of GCD-Connected Array |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4100 |
Minimum Cost Path With Even XOR Parity |
Hard |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4103 |
Remove Elements by Type and Color |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |
| 4104 |
Count Valid Substrings II |
Medium |
Two Pointers |
O(n) |
O(1) |
Explanation |