Skip to content

Latest commit

 

History

History
721 lines (718 loc) · 161 KB

easy.md

File metadata and controls

721 lines (718 loc) · 161 KB

LeetCode Easy Problems

A collection of LeetCode Easy difficulty problems solved with step-by-step explanations, pattern categorization, and optimized source code.

Problem Index

# Problem Pattern Language Time Space Explanation
1 Two Sum Hash Map JavaScript, Python O(n) O(n) Explanation
9 Palindrome Number Two Pointers Python O(n) O(1) Explanation
13 Roman to Integer Prefix Sum Python O(n) O(n) Explanation
14 Longest Common Prefix Prefix Sum Python O(n) O(n) Explanation
20 Valid Parentheses Stack & Queue JavaScript, Python O(n) O(n) Explanation
21 Merge Two Sorted Lists Two Pointers JavaScript, Python O(n) O(1) Explanation
26 Remove Duplicates from Sorted Array Array / General Python O(n) O(1) Explanation
27 Remove Element Array / General Python O(n) O(1) Explanation
28 Find the Index of the First Occurrence in a String Monotonic Stack Python O(n) O(n) Explanation
35 Search Insert Position Binary Search JavaScript, Python O(log n) O(1) Explanation
58 Length of Last Word Hash Map Python O(n) O(n) Explanation
66 Plus One Stack & Queue Python O(n) O(n) Explanation
67 Add Binary Binary Search Python O(n) O(1) Explanation
69 Sqrt(x) Two Pointers Python O(n) O(1) Explanation
70 Climbing Stairs Array / General JavaScript, Python O(n) O(1) Explanation
83 Remove Duplicates from Sorted List Two Pointers PHP, Python O(n) O(1) Explanation
88 Merge Sorted Array Array / General PHP O(n) O(1) Explanation
94 Binary Tree Inorder Traversal Binary Search JavaScript, PHP O(n) O(1) Explanation
100 Same Tree Binary Search PHP O(n) O(1) Explanation
101 Symmetric Tree Binary Search JavaScript, PHP O(n) O(1) Explanation
104 Maximum Depth of Binary Tree Binary Search JavaScript, PHP O(n) O(1) Explanation
108 Convert Sorted Array to Binary Search Tree Binary Search JavaScript, PHP O(n) O(1) Explanation
110 Balanced Binary Tree Binary Search PHP O(n) O(1) Explanation
111 Minimum Depth of Binary Tree Binary Search PHP O(n) O(1) Explanation
112 Path Sum Tree & Graph PHP O(n) O(n) Explanation
118 Pascal's Triangle Math & Logic JavaScript, PHP, Python O(n) O(1) Explanation
119 Pascal's Triangle II Math & Logic PHP O(n) O(1) Explanation
121 Best Time to Buy and Sell Stock Math & Logic JavaScript, PHP, Python O(n) O(1) Explanation
125 Valid Palindrome Two Pointers PHP O(n) O(1) Explanation
136 Single Number Array / General JavaScript, PHP, Python O(n) O(1) Explanation
141 Linked List Cycle Fast & Slow Pointers JavaScript, PHP, Python O(n) O(1) Explanation
144 Binary Tree Preorder Traversal Stack & Queue PHP O(n) O(n) Explanation
145 Binary Tree Postorder Traversal Stack & Queue PHP O(n) O(n) Explanation
160 Intersection of Two Linked Lists Two Pointers JavaScript, PHP O(n) O(1) Explanation
168 Excel Sheet Column Title Array / General PHP O(n) O(1) Explanation
169 Majority Element Array / General JavaScript, PHP O(n) O(1) Explanation
171 Excel Sheet Column Number Array / General PHP O(n) O(1) Explanation
175 Combine Two Tables Database / SQL SQL O(n) O(n) Explanation
181 Employees Earning More Than Their Managers Database / SQL SQL O(n) O(n) Explanation
182 Duplicate Emails Database / SQL SQL O(n) O(n) Explanation
183 Customers Who Never Order Database / SQL SQL O(n) O(n) Explanation
190 Reverse Bits Two Pointers Python O(n) O(1) Explanation
191 Number of 1 Bits Bit Manipulation JavaScript, Python O(n) O(1) Explanation
193 Valid Phone Numbers Array / General Shell O(n) O(1) Explanation
195 Tenth Line Array / General Shell O(n) O(1) Explanation
196 Delete Duplicate Emails Database / SQL SQL O(n) O(n) Explanation
197 Rising Temperature Database / SQL SQL O(n) O(n) Explanation
202 Happy Number Fast & Slow Pointers PHP O(n) O(1) Explanation
203 Remove Linked List Elements Two Pointers PHP O(n) O(1) Explanation
205 Isomorphic Strings Array / General PHP O(n) O(1) Explanation
206 Reverse Linked List Two Pointers JavaScript, PHP, Python O(n) O(1) Explanation
217 Contains Duplicate Array / General PHP O(n) O(1) Explanation
219 Contains Duplicate II Array / General PHP, Python O(n) O(1) Explanation
225 Implement Stack using Queues Trie PHP O(n) O(n) Explanation
226 Invert Binary Tree Binary Search JavaScript, PHP O(n) O(1) Explanation
228 Summary Ranges Two Pointers PHP O(n) O(1) Explanation
231 Power of Two Array / General PHP O(n) O(1) Explanation
232 Implement Queue using Stacks Trie JavaScript, PHP O(n) O(n) Explanation
234 Palindrome Linked List Fast & Slow Pointers JavaScript, PHP O(n) O(1) Explanation
242 Valid Anagram Hash Map PHP O(n) O(n) Explanation
257 Binary Tree Paths Binary Search PHP O(n) O(1) Explanation
258 Add Digits Math & Logic PHP O(n) O(1) Explanation
263 Ugly Number Array / General PHP, Python O(n) O(1) Explanation
268 Missing Number Array / General PHP O(n) O(1) Explanation
278 First Bad Version Two Pointers C++ O(n) O(1) Explanation
283 Move Zeroes Array / General C++, JavaScript O(n) O(1) Explanation
290 Word Pattern Hash Map C++ O(n) O(n) Explanation
292 Nim Game Array / General C++, Kotlin O(n) O(1) Explanation
303 Range Sum Query - Immutable Two Pointers C++ O(n) O(1) Explanation
326 Power of Three Array / General C++ O(n) O(1) Explanation
338 Counting Bits Binary Search C++, JavaScript O(n) O(1) Explanation
342 Power of Four Bit Manipulation Python O(n) O(1) Explanation
344 Reverse String Two Pointers Python O(n) O(1) Explanation
345 Reverse Vowels of a String Two Pointers JavaScript, Python O(n) O(1) Explanation
349 Intersection of Two Arrays Two Pointers Python O(n) O(1) Explanation
350 Intersection of Two Arrays II Two Pointers Python O(n) O(1) Explanation
367 Valid Perfect Square Two Pointers Python O(n) O(1) Explanation
374 Guess Number Higher or Lower Two Pointers JavaScript, Python O(n) O(1) Explanation
383 Ransom Note Array / General Python O(n) O(1) Explanation
387 First Unique Character in a String Hash Map Python O(n) O(n) Explanation
389 Find the Difference Array / General Python O(n) O(1) Explanation
392 Is Subsequence Dynamic Programming JavaScript, Python O(n) O(n) Explanation
401 Binary Watch Binary Search Python O(n) O(1) Explanation
404 Sum of Left Leaves Tree & Graph Python O(n) O(n) Explanation
405 Convert a Number to Hexadecimal Hash Map Python O(n) O(n) Explanation
409 Longest Palindrome Two Pointers Python O(n) O(1) Explanation
412 Fizz Buzz Array / General Python O(n) O(1) Explanation
414 Third Maximum Number Array / General Python O(n) O(1) Explanation
415 Add Strings Array / General Python O(n) O(1) Explanation
434 Number of Segments in a String Array / General Python O(n) O(1) Explanation
441 Arranging Coins Two Pointers Python O(n) O(1) Explanation
448 Find All Numbers Disappeared in an Array Math & Logic TypeScript O(n) O(1) Explanation
455 Assign Cookies Array / General Python O(n) O(1) Explanation
459 Repeated Substring Pattern Array / General JavaScript, Python O(n) O(1) Explanation
461 Hamming Distance Bit Manipulation Python O(n) O(1) Explanation
463 Island Perimeter Dynamic Programming Python O(n) O(n) Explanation
476 Number Complement Hash Map Python O(n) O(n) Explanation
482 License Key Formatting Math & Logic JavaScript, Python O(n) O(1) Explanation
485 Max Consecutive Ones Math & Logic TypeScript O(n) O(1) Explanation
492 Construct the Rectangle Stack & Queue Python O(n) O(n) Explanation
495 Teemo Attacking Dynamic Programming Python O(n) O(n) Explanation
496 Next Greater Element I Hash Map Python O(n) O(n) Explanation
500 Keyboard Row Stack & Queue Python O(n) O(n) Explanation
501 Find Mode in Binary Search Tree Binary Search Python O(n) O(1) Explanation
504 Base 7 Hash Map Python O(n) O(n) Explanation
506 Relative Ranks Array / General Python O(n) O(1) Explanation
507 Perfect Number Array / General Python O(n) O(1) Explanation
509 Fibonacci Number Array / General Python O(n) O(1) Explanation
511 Game Play Analysis I Array / General Python O(n) O(1) Explanation
520 Detect Capital Array / General JavaScript, Python O(n) O(1) Explanation
521 Longest Uncommon Subsequence I Dynamic Programming Python O(n) O(n) Explanation
530 Minimum Absolute Difference in BST Binary Search Python O(n) O(1) Explanation
541 Reverse String II Two Pointers Python O(n) O(1) Explanation
543 Diameter of Binary Tree Binary Search JavaScript, Python O(n) O(1) Explanation
551 Student Attendance Record I Monotonic Stack Python O(n) O(n) Explanation
557 Reverse Words in a String III Array / General Python O(n) O(1) Explanation
559 Maximum Depth of N-ary Tree Tree & Graph Python O(n) O(n) Explanation
561 Array Partition Array / General Python O(n) O(1) Explanation
563 Binary Tree Tilt Binary Search Python O(n) O(1) Explanation
566 Reshape the Matrix Stack & Queue Python O(n) O(n) Explanation
572 Subtree of Another Tree Binary Search Python O(n) O(1) Explanation
575 Distribute Candies Array / General Python O(n) O(1) Explanation
577 Employee Bonus Database / SQL SQL O(n) O(n) Explanation
584 Find Customer Referee Database / SQL SQL O(n) O(n) Explanation
586 Customer Placing the Largest Number of Orders Database / SQL SQL O(n) O(n) Explanation
589 N-ary Tree Preorder Traversal Stack & Queue Python O(n) O(n) Explanation
590 N-ary Tree Postorder Traversal Stack & Queue Python O(n) O(n) Explanation
594 Longest Harmonious Subsequence Hash Map Python O(n) O(n) Explanation
595 Big Countries Database / SQL SQL O(n) O(n) Explanation
596 Classes With at Least 5 Students Database / SQL SQL O(n) O(n) Explanation
598 Range Addition II Bit Manipulation Python O(n) O(1) Explanation
599 Minimum Index Sum of Two Lists Hash Map Python O(n) O(n) Explanation
605 Can Place Flowers Two Pointers JavaScript, Python O(n) O(1) Explanation
607 Sales Person Database / SQL SQL O(n) O(n) Explanation
610 Triangle Judgement Database / SQL SQL O(n) O(n) Explanation
617 Merge Two Binary Trees Binary Search Python O(n) O(1) Explanation
619 Biggest Single Number Database / SQL SQL O(n) O(n) Explanation
620 Not Boring Movies Database / SQL SQL O(n) O(n) Explanation
627 Swap Sex of Employees Database / SQL SQL O(n) O(n) Explanation
628 Maximum Product of Three Numbers Binary Search Elixir O(n) O(1) Explanation
637 Average of Levels in Binary Tree Binary Search Python O(n) O(1) Explanation
643 Maximum Average Subarray I Sliding Window JavaScript, Python O(n) O(1) Explanation
645 Set Mismatch Bit Manipulation TypeScript O(n) O(1) Explanation
653 Two Sum IV - Input is a BST Binary Search Python O(n) O(1) Explanation
657 Robot Return to Origin Array / General Python O(n) O(1) Explanation
661 Image Smoother Array / General Python O(n) O(1) Explanation
671 Second Minimum Node In a Binary Tree Two Pointers Python O(n) O(1) Explanation
674 Longest Continuous Increasing Subsequence Dynamic Programming Python O(n) O(n) Explanation
680 Valid Palindrome II Two Pointers Python O(n) O(1) Explanation
682 Baseball Game Bit Manipulation Python O(n) O(1) Explanation
693 Binary Number with Alternating Bits Two Pointers Python O(n) O(1) Explanation
696 Count Binary Substrings Stack & Queue Python O(n) O(n) Explanation
697 Degree of an Array Hash Map Python O(n) O(n) Explanation
700 Search in a Binary Search Tree Binary Search JavaScript, Python O(n) O(1) Explanation
703 Kth Largest Element in a Stream Array / General Python O(n) O(1) Explanation
704 Binary Search Binary Search Python O(log n) O(1) Explanation
705 Design HashSet Hash Map Python O(n) O(n) Explanation
706 Design HashMap Hash Map Python O(n) O(n) Explanation
709 To Lower Case Array / General Python O(n) O(1) Explanation
717 1-bit and 2-bit Characters Hash Map Python O(n) O(n) Explanation
724 Find Pivot Index Two Pointers JavaScript, Python O(n) O(1) Explanation
728 Self Dividing Numbers Array / General Python O(n) O(1) Explanation
733 Flood Fill Tree & Graph Python O(n) O(n) Explanation
744 Find Smallest Letter Greater Than Target Prefix Sum Python O(n) O(n) Explanation
746 Min Cost Climbing Stairs Stack & Queue JavaScript, Python O(n) O(n) Explanation
747 Largest Number At Least Twice of Others Array / General Python O(n) O(1) Explanation
748 Shortest Completing Word Hash Map Python O(n) O(n) Explanation
762 Prime Number of Set Bits in Binary Representation Two Pointers Python O(n) O(1) Explanation
766 Toeplitz Matrix Stack & Queue Python O(n) O(n) Explanation
771 Jewels and Stones Array / General Python O(n) O(1) Explanation
783 Minimum Distance Between BST Nodes Binary Search Python O(n) O(1) Explanation
796 Rotate String Math & Logic C++, JavaScript O(n) O(1) Explanation
804 Unique Morse Code Words Binary Search Python O(n) O(1) Explanation
806 Number of Lines To Write String Array / General Python O(n) O(1) Explanation
812 Largest Triangle Area Math & Logic Python O(n) O(1) Explanation
819 Most Common Word Binary Search Python O(n) O(1) Explanation
821 Shortest Distance to a Character Array / General Python O(n) O(1) Explanation
824 Goat Latin Array / General Python O(n) O(1) Explanation
830 Positions of Large Groups Two Pointers Python O(n) O(1) Explanation
832 Flipping an Image Array / General Python O(n) O(1) Explanation
836 Rectangle Overlap Math & Logic JavaScript O(n) O(1) Explanation
844 Backspace String Compare Hash Map Python O(n) O(n) Explanation
859 Buddy Strings Two Pointers Python O(n) O(1) Explanation
860 Lemonade Change Array / General Python O(n) O(1) Explanation
867 Transpose Matrix Stack & Queue Python O(n) O(n) Explanation
868 Binary Gap Binary Search Python O(n) O(1) Explanation
872 Leaf-Similar Trees Binary Search JavaScript, Python O(n) O(1) Explanation
876 Middle of the Linked List Fast & Slow Pointers Python O(n) O(1) Explanation
883 Projection Area of 3D Shapes Array / General Python O(n) O(1) Explanation
884 Uncommon Words from Two Sentences Hash Map Python O(n) O(n) Explanation
888 Fair Candy Swap Array / General Python O(n) O(1) Explanation
892 Surface Area of 3D Shapes Array / General Python O(n) O(1) Explanation
896 Monotonic Array Monotonic Stack Python O(n) O(n) Explanation
897 Increasing Order Search Tree Binary Search Python O(n) O(1) Explanation
905 Sort Array By Parity Hash Map Python O(n) O(n) Explanation
908 Smallest Range I Bit Manipulation Python O(n) O(1) Explanation
914 X of a Kind in a Deck of Cards Hash Map Python O(n) O(n) Explanation
917 Reverse Only Letters Two Pointers Python O(n) O(1) Explanation
922 Sort Array By Parity II Array / General Python O(n) O(1) Explanation
925 Long Pressed Name Array / General Python O(n) O(1) Explanation
929 Unique Email Addresses Binary Search Python O(n) O(1) Explanation
933 Number of Recent Calls Hash Map JavaScript, Python O(n) O(n) Explanation
938 Range Sum of BST Binary Search Python O(n) O(1) Explanation
941 Valid Mountain Array Two Pointers Python O(n) O(1) Explanation
942 DI String Match Array / General Python O(n) O(1) Explanation
944 Delete Columns to Make Sorted Array / General Python O(n) O(1) Explanation
953 Verifying an Alien Dictionary Hash Map Python O(n) O(n) Explanation
961 N-Repeated Element in Size 2N Array Array / General Python O(n) O(1) Explanation
965 Univalued Binary Tree Binary Search Python O(n) O(1) Explanation
976 Largest Perimeter Triangle Math & Logic Python O(n) O(1) Explanation
977 Squares of a Sorted Array Array / General Python O(n) O(1) Explanation
989 Add to Array-Form of Integer Array / General Python O(n) O(1) Explanation
993 Cousins in Binary Tree Binary Search Python O(n) O(1) Explanation
997 Find the Town Judge Array / General Python O(n) O(1) Explanation
999 Available Captures for Rook Array / General Python O(n) O(1) Explanation
1002 Find Common Characters Hash Map Python O(n) O(n) Explanation
1005 Maximize Sum Of Array After K Negations Array / General Python O(n) O(1) Explanation
1009 Complement of Base 10 Integer Hash Map Python O(n) O(n) Explanation
1013 Partition Array Into Three Parts With Equal Sum Array / General Python O(n) O(1) Explanation
1018 Binary Prefix Divisible By 5 Trie Python O(n) O(n) Explanation
1021 Remove Outermost Parentheses Monotonic Stack Python O(n) O(n) Explanation
1022 Sum of Root To Leaf Binary Numbers Tree & Graph Python O(n) O(n) Explanation
1025 Divisor Game Array / General Python O(n) O(1) Explanation
1030 Matrix Cells in Distance Order Stack & Queue Python O(n) O(n) Explanation
1037 Valid Boomerang Array / General Python O(n) O(1) Explanation
1046 Last Stone Weight Stack & Queue JavaScript, Python O(n) O(n) Explanation
1047 Remove All Adjacent Duplicates In String Stack & Queue Python O(n) O(n) Explanation
1050 Actors and Directors Who Cooperated At Least Three Times Database / SQL SQL O(n) O(n) Explanation
1051 Height Checker Stack & Queue Python O(n) O(n) Explanation
1068 Product Sales Analysis I Database / SQL SQL O(n) O(n) Explanation
1071 Greatest Common Divisor of Strings Two Pointers JavaScript, Python O(n) O(1) Explanation
1075 Project Employees I Database / SQL SQL O(n) O(n) Explanation
1078 Occurrences After Bigram Array / General Python O(n) O(1) Explanation
1084 Sales Analysis III Database / SQL SQL O(n) O(n) Explanation
1089 Duplicate Zeros Array / General Python O(n) O(1) Explanation
1103 Distribute Candies to People Array / General Python O(n) O(1) Explanation
1108 Defanging an IP Address Array / General Python O(n) O(1) Explanation
1114 Print in Order Hash Map Java O(n) O(n) Explanation
1122 Relative Sort Array Hash Map Python O(n) O(n) Explanation
1128 Number of Equivalent Domino Pairs Hash Map Python O(n) O(n) Explanation
1137 N-th Tribonacci Number Bit Manipulation JavaScript, Python O(n) O(1) Explanation
1141 User Activity for the Past 30 Days I Database / SQL SQL O(n) O(n) Explanation
1148 Article Views I Database / SQL SQL O(n) O(n) Explanation
1154 Day of the Year Array / General Python O(n) O(1) Explanation
1160 Find Words That Can Be Formed by Characters Hash Map Python O(n) O(n) Explanation
1175 Prime Arrangements Bit Manipulation Python O(n) O(1) Explanation
1179 Reformat Department Table Database / SQL SQL O(n) O(n) Explanation
1185 Day of the Week Array / General Python O(n) O(1) Explanation
1189 Maximum Number of Balloons Hash Map Kotlin O(n) O(n) Explanation
1200 Minimum Absolute Difference Array / General Python O(n) O(1) Explanation
1207 Unique Number of Occurrences Hash Map JavaScript, Python O(n) O(n) Explanation
1211 Queries Quality and Percentage Database / SQL SQL O(n) O(n) Explanation
1217 Minimum Cost to Move Chips to The Same Position Tree & Graph Python O(n) O(n) Explanation
1221 Split a String in Balanced Strings Array / General Python O(n) O(1) Explanation
1232 Check If It Is a Straight Line Array / General Python O(n) O(1) Explanation
1251 Average Selling Price Database / SQL SQL O(n) O(n) Explanation
1252 Cells with Odd Values in a Matrix Two Pointers Python O(n) O(1) Explanation
1260 Shift 2D Grid Tree & Graph Racket O(n) O(n) Explanation
1266 Minimum Time Visiting All Points Stack & Queue Python O(n) O(n) Explanation
1275 Find Winner on a Tic Tac Toe Game Array / General Python O(n) O(1) Explanation
1280 Students and Examinations Database / SQL SQL O(n) O(n) Explanation
1281 Subtract the Product and Sum of Digits of an Integer Prefix Sum Python O(n) O(n) Explanation
1287 Element Appearing More Than 25% In Sorted Array Array / General Python O(n) O(1) Explanation
1290 Convert Binary Number in a Linked List to Integer Binary Search Python O(n) O(1) Explanation
1295 Find Numbers with Even Number of Digits Math & Logic Python O(n) O(1) Explanation
1299 Replace Elements with Greatest Element on Right Side Two Pointers Python O(n) O(1) Explanation
1309 Decrypt String from Alphabet to Integer Mapping Two Pointers Python O(n) O(1) Explanation
1313 Decompress Run-Length Encoded List Array / General Python O(n) O(1) Explanation
1317 Convert Integer to the Sum of Two No-Zero Integers Bit Manipulation Python O(n) O(1) Explanation
1323 Maximum 69 Number Array / General Python O(n) O(1) Explanation
1327 List the Products Ordered in a Period Database / SQL SQL O(n) O(n) Explanation
1331 Rank Transform of an Array Binary Search Kotlin O(n) O(1) Explanation
1332 Remove Palindromic Subsequences Dynamic Programming Python O(n) O(n) Explanation
1337 The K Weakest Rows in a Matrix Stack & Queue Python O(n) O(n) Explanation
1342 Number of Steps to Reduce a Number to Zero Array / General Python O(n) O(1) Explanation
1346 Check If N and Its Double Exist Array / General Python O(n) O(1) Explanation
1351 Count Negative Numbers in a Sorted Matrix Stack & Queue Python O(n) O(n) Explanation
1356 Sort Integers by The Number of 1 Bits Stack & Queue Python O(n) O(n) Explanation
1360 Number of Days Between Two Dates Array / General Python O(n) O(1) Explanation
1365 How Many Numbers Are Smaller Than the Current Number Prefix Sum TypeScript O(n) O(n) Explanation
1370 Increasing Decreasing String Two Pointers Python O(n) O(1) Explanation
1374 Generate a String With Characters That Have Odd Counts Array / General Python O(n) O(1) Explanation
1378 Replace Employee ID With The Unique Identifier Database / SQL SQL O(n) O(n) Explanation
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree Binary Search Python O(n) O(1) Explanation
1380 Lucky Numbers in a Matrix Two Pointers Python O(n) O(1) Explanation
1385 Find the Distance Value Between Two Arrays Array / General Python O(n) O(1) Explanation
1389 Create Target Array in the Given Order Hash Map Python O(n) O(n) Explanation
1394 Find Lucky Integer in an Array Hash Map Python O(n) O(n) Explanation
1399 Count Largest Group Hash Map Python O(n) O(n) Explanation
1403 Minimum Subsequence in Non-Increasing Order Dynamic Programming Python O(n) O(n) Explanation
1407 Top Travellers Database / SQL SQL O(n) O(n) Explanation
1408 String Matching in an Array Array / General Python O(n) O(1) Explanation
1413 Minimum Value to Get Positive Step by Step Sum Array / General Python O(n) O(1) Explanation
1417 Reformat The String Two Pointers Python O(n) O(1) Explanation
1422 Maximum Score After Splitting a String Array / General Python O(n) O(1) Explanation
1431 Kids With the Greatest Number of Candies Math & Logic JavaScript, Python O(n) O(1) Explanation
1436 Destination City Array / General Python O(n) O(1) Explanation
1437 Check If All 1's Are at Least Length K Places Away Array / General Python O(n) O(1) Explanation
1446 Consecutive Characters Array / General Python O(n) O(1) Explanation
1450 Number of Students Doing Homework at a Given Time Hash Map Python O(n) O(n) Explanation
1455 Check If a Word Occurs As a Prefix of Any Word in a Sentence Prefix Sum Python O(n) O(n) Explanation
1460 Make Two Arrays Equal by Reversing Subarrays Hash Map Python O(n) O(n) Explanation
1464 Maximum Product of Two Elements in an Array Binary Search Scala O(n) O(1) Explanation
1470 Shuffle the Array Array / General TypeScript O(n) O(1) Explanation
1475 Final Prices With a Special Discount in a Shop Monotonic Stack TypeScript O(n) O(n) Explanation
1480 Running Sum of 1d Array Array / General Python O(n) O(1) Explanation
1484 Group Sold Products By The Date Database / SQL SQL O(n) O(n) Explanation
1486 XOR Operation in an Array Bit Manipulation Python O(n) O(1) Explanation
1491 Average Salary Excluding the Minimum and Maximum Salary Array / General Python O(n) O(1) Explanation
1496 Path Crossing Stack & Queue Python O(n) O(n) Explanation
1502 Can Make Arithmetic Progression From Sequence Array / General Python O(n) O(1) Explanation
1507 Reformat Date Array / General Python O(n) O(1) Explanation
1512 Number of Good Pairs Hash Map Python O(n) O(n) Explanation
1517 Find Users With Valid E-Mails Database / SQL SQL O(n) O(n) Explanation
1518 Water Bottles Array / General Python O(n) O(1) Explanation
1523 Count Odd Numbers in an Interval Range Heap Python O(n) O(n) Explanation
1527 Patients With a Condition Database / SQL SQL O(n) O(n) Explanation
1528 Shuffle String Array / General Python O(n) O(1) Explanation
1534 Count Good Triplets Stack & Queue Python O(n) O(n) Explanation
1539 Kth Missing Positive Number Two Pointers JavaScript O(n) O(1) Explanation
1544 Make The String Great Stack & Queue Python O(n) O(n) Explanation
1550 Three Consecutive Odds Array / General Python O(n) O(1) Explanation
1556 Thousand Separator Array / General Python O(n) O(1) Explanation
1560 Most Visited Sector in a Circular Track Two Pointers Python O(n) O(1) Explanation
1566 Detect Pattern of Length M Repeated K or More Times Hash Map Python O(n) O(n) Explanation
1572 Matrix Diagonal Sum Stack & Queue Python O(n) O(n) Explanation
1576 Replace All ?'s to Avoid Consecutive Repeating Characters Two Pointers Python O(n) O(1) Explanation
1581 Customer Who Visited but Did Not Make Any Transactions Database / SQL SQL O(n) O(n) Explanation
1582 Special Positions in a Binary Matrix Stack & Queue JavaScript O(n) O(n) Explanation
1587 Bank Account Summary II Database / SQL SQL O(n) O(n) Explanation
1588 Sum of All Odd Length Subarrays Array / General C++ O(n) O(1) Explanation
1592 Rearrange Spaces Between Words Array / General C++ O(n) O(1) Explanation
1598 Crawler Log Folder Array / General C++ O(n) O(1) Explanation
1603 Design Parking System Array / General C++ O(n) O(1) Explanation
1608 Special Array With X Elements Greater Than or Equal X Array / General C++ O(n) O(1) Explanation
1614 Maximum Nesting Depth of the Parentheses Stack & Queue Java O(n) O(n) Explanation
1619 Mean of Array After Removing Some Elements Two Pointers C++ O(n) O(1) Explanation
1624 Largest Substring Between Two Equal Characters Array / General C++ O(n) O(1) Explanation
1629 Slowest Key Two Pointers C++ O(n) O(1) Explanation
1633 Percentage of Users Attended a Contest Database / SQL SQL O(n) O(n) Explanation
1636 Sort Array by Increasing Frequency Hash Map C++ O(n) O(n) Explanation
1637 Widest Vertical Area Between Two Points Containing No Points Two Pointers C++ O(n) O(1) Explanation
1640 Check Array Formation Through Concatenation Hash Map C++ O(n) O(n) Explanation
1646 Get Maximum in Generated Array Array / General C++ O(n) O(1) Explanation
1652 Defuse the Bomb Array / General C++ O(n) O(1) Explanation
1656 Design an Ordered Stream Bit Manipulation C++ O(n) O(1) Explanation
1661 Average Time of Process per Machine Database / SQL SQL O(n) O(n) Explanation
1662 Check If Two String Arrays are Equivalent Array / General C++ O(n) O(1) Explanation
1667 Fix Names in a Table Database / SQL SQL O(n) O(n) Explanation
1668 Maximum Repeating Substring Array / General C++ O(n) O(1) Explanation
1672 Richest Customer Wealth Array / General C++ O(n) O(1) Explanation
1678 Goal Parser Interpretation Array / General C++ O(n) O(1) Explanation
1683 Invalid Tweets Database / SQL SQL O(n) O(n) Explanation
1684 Count the Number of Consistent Strings Two Pointers C++ O(n) O(1) Explanation
1688 Count of Matches in Tournament Stack & Queue C++ O(n) O(n) Explanation
1693 Daily Leads and Partners Database / SQL SQL O(n) O(n) Explanation
1694 Reformat Phone Number Array / General C++ O(n) O(1) Explanation
1700 Number of Students Unable to Eat Lunch Stack & Queue C++, JavaScript O(n) O(n) Explanation
1704 Determine if String Halves Are Alike Array / General C++ O(n) O(1) Explanation
1710 Maximum Units on a Truck Two Pointers C++ O(n) O(1) Explanation
1716 Calculate Money in Leetcode Bank Array / General C++ O(n) O(1) Explanation
1720 Decode XORed Array Bit Manipulation C++ O(n) O(1) Explanation
1725 Number Of Rectangles That Can Form The Largest Square Stack & Queue C++ O(n) O(n) Explanation
1729 Find Followers Count Database / SQL SQL O(n) O(n) Explanation
1731 The Number of Employees Which Report to Each Employee Database / SQL SQL O(n) O(n) Explanation
1732 Find the Highest Altitude Math & Logic JavaScript, Kotlin, Python O(n) O(1) Explanation
1736 Latest Time by Replacing Hidden Digits Math & Logic C++ O(n) O(1) Explanation
1741 Find Total Time Spent by Each Employee Database / SQL SQL O(n) O(n) Explanation
1742 Maximum Number of Balls in a Box Two Pointers C++ O(n) O(1) Explanation
1748 Sum of Unique Elements Hash Map C++ O(n) O(n) Explanation
1752 Check if Array Is Sorted and Rotated Binary Search C++ O(n) O(1) Explanation
1757 Recyclable and Low Fat Products Database / SQL SQL O(n) O(n) Explanation
1758 Minimum Changes To Make Alternating Binary String Stack & Queue C++ O(n) O(n) Explanation
1763 Longest Nice Substring Two Pointers C++ O(n) O(1) Explanation
1768 Merge Strings Alternately Array / General C++ O(n) O(1) Explanation
1773 Count Items Matching a Rule Array / General C++ O(n) O(1) Explanation
1779 Find Nearest Point That Has the Same X or Y Coordinate Hash Map C++ O(n) O(n) Explanation
1784 Check if Binary String Has at Most One Segment of Ones Bit Manipulation C++ O(n) O(1) Explanation
1789 Primary Department for Each Employee Database / SQL SQL O(n) O(n) Explanation
1790 Check if One String Swap Can Make Strings Equal Array / General C++ O(n) O(1) Explanation
1791 Find Center of Star Graph Array / General C++ O(n) O(1) Explanation
1795 Rearrange Products Table Database / SQL SQL O(n) O(n) Explanation
1796 Second Largest Digit in a String Math & Logic C++ O(n) O(1) Explanation
1800 Maximum Ascending Subarray Sum Two Pointers C++ O(n) O(1) Explanation
1805 Number of Different Integers in a String Bit Manipulation C++ O(n) O(1) Explanation
1812 Determine Color of a Chessboard Square Array / General C++ O(n) O(1) Explanation
1816 Truncate Sentence Array / General C++ O(n) O(1) Explanation
1822 Sign of the Product of an Array Array / General C++ O(n) O(1) Explanation
1827 Minimum Operations to Make the Array Increasing Hash Map C++ O(n) O(n) Explanation
1832 Check if the Sentence Is Pangram Array / General C++ O(n) O(1) Explanation
1837 Sum of Digits in Base K Math & Logic C++ O(n) O(1) Explanation
1844 Replace All Digits with Characters Math & Logic C++ O(n) O(1) Explanation
1848 Minimum Distance to the Target Element Two Pointers C++ O(n) O(1) Explanation
1854 Maximum Population Year Stack & Queue C++ O(n) O(n) Explanation
1859 Sorting the Sentence Array / General C++ O(n) O(1) Explanation
1863 Sum of All Subset XOR Totals Backtracking C++ O(n) O(1) Explanation
1869 Longer Contiguous Segments of Ones than Zeros Array / General C++ O(n) O(1) Explanation
1873 Calculate Special Bonus Database / SQL SQL O(n) O(n) Explanation
1876 Substrings of Size Three with Distinct Characters Array / General C++ O(n) O(1) Explanation
1880 Check if Word Equals Summation of Two Words Array / General C++ O(n) O(1) Explanation
1886 Determine Whether Matrix Can Be Obtained By Rotation Stack & Queue C++ O(n) O(n) Explanation
1890 The Latest Login in 2020 Database / SQL SQL O(n) O(n) Explanation
1893 Check if All the Integers in a Range Are Covered Two Pointers C++ O(n) O(1) Explanation
1897 Redistribute Characters to Make All Strings Equal Array / General C++ O(n) O(1) Explanation
1903 Largest Odd Number in String Bit Manipulation C++ O(n) O(1) Explanation
1909 Remove One Element to Make the Array Strictly Increasing Hash Map C++ O(n) O(n) Explanation
1913 Maximum Product Difference Between Two Pairs Hash Map C++ O(n) O(n) Explanation
1920 Build Array from Permutation Backtracking C++ O(n) O(1) Explanation
1925 Count Square Sum Triples Array / General C++ O(n) O(1) Explanation
1929 Concatenation of Array Array / General TypeScript O(n) O(1) Explanation
1935 Maximum Number of Words You Can Type Array / General C++ O(n) O(1) Explanation
1941 Check if All Characters Have Equal Number of Occurrences Hash Map C++ O(n) O(n) Explanation
1945 Sum of Digits of String After Convert Math & Logic C++ O(n) O(1) Explanation
1952 Three Divisors Array / General C++ O(n) O(1) Explanation
1957 Delete Characters to Make Fancy String Array / General C++ O(n) O(1) Explanation
1961 Check If String Is a Prefix of Array Prefix Sum C++ O(n) O(n) Explanation
1965 Employees With Missing Information Database / SQL SQL O(n) O(n) Explanation
1967 Number of Strings That Appear as Substrings in Word Two Pointers Kotlin O(n) O(1) Explanation
1971 Find if Path Exists in Graph Dynamic Programming JavaScript O(n) O(n) Explanation
1974 Minimum Time to Type Word Using Special Typewriter Math & Logic JavaScript O(n) O(1) Explanation
1978 Employees Whose Manager Left the Company Database / SQL SQL O(n) O(n) Explanation
1979 Find Greatest Common Divisor of Array Array / General Kotlin O(n) O(1) Explanation
1984 Minimum Difference Between Highest and Lowest of K Scores Bit Manipulation JavaScript O(n) O(1) Explanation
1991 Find the Middle Index in Array Two Pointers JavaScript O(n) O(1) Explanation
1995 Count Special Quadruplets Array / General JavaScript O(n) O(1) Explanation
2000 Reverse Prefix of Word Trie JavaScript O(n) O(n) Explanation
2006 Count Number of Pairs With Absolute Difference K Hash Map Python O(n) O(n) Explanation
2011 Final Value of Variable After Performing Operations Hash Map JavaScript O(n) O(n) Explanation
2022 Convert 1D Array Into 2D Array Binary Search Python O(n) O(1) Explanation
2027 Minimum Moves to Convert String Hash Map JavaScript O(n) O(n) Explanation
2032 Two Out of Three Array / General Python O(n) O(1) Explanation
2037 Minimum Number of Moves to Seat Everyone Hash Map Python O(n) O(n) Explanation
2042 Check if Numbers Are Ascending in a Sentence Two Pointers JavaScript O(n) O(1) Explanation
2047 Number of Valid Words in a Sentence Array / General JavaScript O(n) O(1) Explanation
2053 Kth Distinct String in an Array Hash Map JavaScript O(n) O(n) Explanation
2062 Count Vowel Substrings of a String Array / General JavaScript O(n) O(1) Explanation
2068 Check Whether Two Strings are Almost Equivalent Hash Map JavaScript O(n) O(n) Explanation
2073 Time Needed to Buy Tickets Math & Logic JavaScript O(n) O(1) Explanation
2078 Two Furthest Houses With Different Colors Tree & Graph Python O(n) O(n) Explanation
2085 Count Common Words With One Occurrence Hash Map JavaScript O(n) O(n) Explanation
2089 Find Target Indices After Sorting Array Array / General Python O(n) O(1) Explanation
2094 Finding 3-Digit Even Numbers Bit Manipulation Python O(n) O(1) Explanation
2099 Find Subsequence of Length K With the Largest Sum Dynamic Programming Python O(n) O(n) Explanation
2103 Rings and Rods Array / General JavaScript O(n) O(1) Explanation
2108 Find First Palindromic String in the Array Two Pointers JavaScript O(n) O(1) Explanation
2114 Maximum Number of Words Found in Sentences Array / General Python O(n) O(1) Explanation
2119 A Number After a Double Reversal Two Pointers Python O(n) O(1) Explanation
2124 Check if All A's Appears Before All B's Array / General Python O(n) O(1) Explanation
2133 Check if Every Row and Column Contains All Numbers Array / General Python O(n) O(1) Explanation
2138 Divide a String Into Groups of Size k Array / General Python O(n) O(1) Explanation
2144 Minimum Cost of Buying Candies With Discount Sliding Window Kotlin O(n) O(1) Explanation
2148 Count Elements With Strictly Smaller and Greater Elements Hash Map Python O(n) O(n) Explanation
2154 Keep Multiplying Found Values by Two Stack & Queue Python O(n) O(n) Explanation
2160 Minimum Sum of Four Digit Number After Splitting Digits Math & Logic Python O(n) O(1) Explanation
2164 Sort Even and Odd Indices Independently Array / General JavaScript O(n) O(1) Explanation
2169 Count Operations to Obtain Zero Bit Manipulation Python O(n) O(1) Explanation
2180 Count Integers With Even Digit Sum Dynamic Programming Python O(n) O(n) Explanation
2190 Most Frequent Number Following Key In an Array Hash Map Python O(n) O(n) Explanation
2206 Divide Array Into Equal Pairs Hash Map Python O(n) O(n) Explanation
2215 Find the Difference of Two Arrays Array / General JavaScript O(n) O(1) Explanation
2220 Minimum Bit Flips to Convert Number Bit Manipulation Python O(n) O(1) Explanation
2224 Minimum Number of Operations to Convert Time Array / General Python O(n) O(1) Explanation
2231 Largest Number After Digit Swaps by Parity Math & Logic JavaScript O(n) O(1) Explanation
2236 Root Equals Sum of Children Stack & Queue Python O(n) O(n) Explanation
2243 Calculate Digit Sum of a String Math & Logic Python O(n) O(1) Explanation
2248 Intersection of Multiple Arrays Two Pointers Python O(n) O(1) Explanation
2259 Remove Digit From Number to Maximize Result Math & Logic Python O(n) O(1) Explanation
2269 Find the K-Beauty of a Number Bit Manipulation Python O(n) O(1) Explanation
2273 Find Resultant Array After Removing Anagrams Hash Map JavaScript O(n) O(n) Explanation
2283 Check if Number Has Equal Digit Count and Digit Value Bit Manipulation Python O(n) O(1) Explanation
2287 Rearrange Characters to Make Target String Hash Map Python O(n) O(n) Explanation
2293 Min Max Game Stack & Queue JavaScript O(n) O(n) Explanation
2303 Calculate Amount Paid in Taxes Stack & Queue JavaScript O(n) O(n) Explanation
2309 Greatest English Letter in Upper and Lower Case Array / General Python O(n) O(1) Explanation
2319 Check if Matrix Is X-Matrix Stack & Queue Python O(n) O(n) Explanation
2331 Evaluate Boolean Binary Tree Binary Search JavaScript O(n) O(1) Explanation
2335 Minimum Amount of Time to Fill Cups Array / General Python O(n) O(1) Explanation
2341 Maximum Number of Pairs in Array Hash Map Python O(n) O(n) Explanation
2347 Best Poker Hand Hash Map Python O(n) O(n) Explanation
2351 First Letter to Appear Twice Array / General Java O(n) O(1) Explanation
2356 Number of Unique Subjects Taught by Each Teacher Database / SQL SQL O(n) O(n) Explanation
2357 Make Array Zero by Subtracting Equal Amounts Array / General JavaScript O(n) O(1) Explanation
2363 Merge Similar Items Array / General JavaScript O(n) O(1) Explanation
2367 Number of Arithmetic Triplets Array / General Python O(n) O(1) Explanation
2373 Largest Local Values in a Matrix Stack & Queue Python O(n) O(n) Explanation
2379 Minimum Recolors to Get K Consecutive Black Blocks Bit Manipulation Python O(n) O(1) Explanation
2383 Minimum Hours of Training to Win a Competition Array / General Python O(n) O(1) Explanation
2389 Longest Subsequence With Limited Sum Dynamic Programming Python O(n) O(n) Explanation
2404 Most Frequent Even Element Hash Map Python O(n) O(n) Explanation
2409 Count Days Spent Together Tree & Graph Python O(n) O(n) Explanation
2413 Smallest Even Multiple Two Pointers Python O(n) O(1) Explanation
2418 Sort the People Array / General JavaScript O(n) O(1) Explanation
2423 Remove Letter To Equalize Frequency Hash Map Python O(n) O(n) Explanation
2427 Number of Common Factors Binary Search Python O(n) O(1) Explanation
2437 Number of Valid Clock Times Array / General Python O(n) O(1) Explanation
2441 Largest Positive Integer That Exists With Its Negative Array / General JavaScript O(n) O(1) Explanation
2460 Apply Operations to an Array Two Pointers JavaScript O(n) O(1) Explanation
2465 Number of Distinct Averages Array / General JavaScript O(n) O(1) Explanation
2475 Number of Unequal Triplets in Array Array / General JavaScript O(n) O(1) Explanation
2481 Minimum Cuts to Divide a Circle Sliding Window Python O(n) O(1) Explanation
2485 Find the Pivot Integer Array / General Python O(n) O(1) Explanation
2500 Delete Greatest Value in Each Row Two Pointers JavaScript O(n) O(1) Explanation
2506 Count Pairs Of Similar Strings Hash Map Python O(n) O(n) Explanation
2529 Maximum Count of Positive Integer and Negative Integer Binary Search Python O(n) O(1) Explanation
2540 Minimum Common Value Sliding Window C++ O(n) O(1) Explanation
2549 Count Distinct Numbers on Board Math & Logic JavaScript O(n) O(1) Explanation
2553 Separate the Digits in an Array Math & Logic C++ O(n) O(1) Explanation
2558 Take Gifts From the Richest Pile Math & Logic Python O(n) O(1) Explanation
2562 Find the Array Concatenation Value Two Pointers JavaScript O(n) O(1) Explanation
2566 Maximum Difference by Remapping a Digit Math & Logic Python O(n) O(1) Explanation
2574 Left and Right Sum Differences Prefix Sum Kotlin O(n) O(n) Explanation
2578 Split With Minimum Sum Array / General Python O(n) O(1) Explanation
2582 Pass the Pillow Math & Logic JavaScript O(n) O(1) Explanation
2586 Count the Number of Vowel Strings in Range Array / General Python O(n) O(1) Explanation
2591 Distribute Money to Maximum Children Array / General Python O(n) O(1) Explanation
2595 Number of Even and Odd Bits Two Pointers Python O(n) O(1) Explanation
2600 K Items With the Maximum Sum Array / General Python O(n) O(1) Explanation
2605 Form Smallest Number From Two Digit Arrays Math & Logic Python O(n) O(1) Explanation
2614 Prime In Diagonal Bit Manipulation Python O(n) O(1) Explanation
2619 Array Prototype Last Array / General JavaScript O(n) O(1) Explanation
2620 Counter Array / General JavaScript O(n) O(1) Explanation
2621 Sleep Array / General JavaScript O(n) O(1) Explanation
2626 Array Reduce Transformation Array / General TypeScript O(n) O(1) Explanation
2629 Function Composition Array / General TypeScript O(n) O(1) Explanation
2634 Filter Elements from Array Array / General TypeScript O(n) O(1) Explanation
2635 Apply Transform Over Each Element in Array Hash Map TypeScript O(n) O(n) Explanation
2639 Find the Width of Columns of a Grid Stack & Queue Python O(n) O(n) Explanation
2643 Row With Maximum Ones Array / General Python O(n) O(1) Explanation
2648 Generate Fibonacci Sequence Array / General TypeScript O(n) O(1) Explanation
2656 Maximum Sum With Exactly K Elements Array / General Python O(n) O(1) Explanation
2660 Determine the Winner of a Bowling Game Array / General JavaScript O(n) O(1) Explanation
2665 Counter II Array / General TypeScript O(n) O(1) Explanation
2666 Allow One Function Call Array / General TypeScript O(n) O(1) Explanation
2667 Create Hello World Function Tree & Graph TypeScript O(n) O(n) Explanation
2677 Chunk Array Array / General TypeScript O(n) O(1) Explanation
2682 Find the Losers of the Circular Game Array / General JavaScript O(n) O(1) Explanation
2695 Array Wrapper Array / General TypeScript O(n) O(1) Explanation
2696 Minimum String Length After Removing Substrings Stack & Queue C++ O(n) O(n) Explanation
2697 Lexicographically Smallest Palindrome Two Pointers Python O(n) O(1) Explanation
2703 Return Length of Arguments Passed Hash Map TypeScript O(n) O(n) Explanation
2704 To Be Or Not To Be Array / General TypeScript O(n) O(1) Explanation
2706 Buy Two Chocolates Array / General Python O(n) O(1) Explanation
2717 Semi-Ordered Permutation Backtracking JavaScript O(n) O(1) Explanation
2723 Add Two Promises Bit Manipulation TypeScript O(n) O(1) Explanation
2724 Sort By Array / General TypeScript O(n) O(1) Explanation
2725 Interval Cancellation Heap TypeScript O(n) O(n) Explanation
2726 Calculator with Method Chaining Hash Map TypeScript O(n) O(n) Explanation
2727 Is Object Empty Array / General TypeScript O(n) O(1) Explanation
2739 Total Distance Traveled Math & Logic JavaScript O(n) O(1) Explanation
2744 Find Maximum Number of String Pairs Array / General JavaScript O(n) O(1) Explanation
2748 Number of Beautiful Pairs Math & Logic JavaScript O(n) O(1) Explanation
2760 Longest Even Odd Subarray With Threshold Two Pointers Python O(n) O(1) Explanation
2765 Longest Alternating Subarray Array / General Python O(n) O(1) Explanation
2778 Sum of Squares of Special Elements Array / General JavaScript O(n) O(1) Explanation
2784 Check if Array is Good Array / General C++ O(n) O(1) Explanation
2810 Faulty Keyboard Array / General JavaScript O(n) O(1) Explanation
2824 Count Pairs Whose Sum is Less than Target Array / General Python O(n) O(1) Explanation
2833 Furthest Point From Origin Array / General Python O(n) O(1) Explanation
2843 Count Symmetric Integers Array / General Python O(n) O(1) Explanation
2848 Points That Intersect With Cars Two Pointers JavaScript O(n) O(1) Explanation
2859 Sum of Values at Indices With K Set Bits Bit Manipulation Python O(n) O(1) Explanation
2864 Maximum Odd Binary Number Bit Manipulation JavaScript O(n) O(1) Explanation
2869 Minimum Operations to Collect Elements Array / General Python O(n) O(1) Explanation
2873 Maximum Value of an Ordered Triplet I Math & Logic JavaScript O(n) O(1) Explanation
2877 Create a DataFrame from List Two Pointers Python O(n) O(1) Explanation
2878 Get the Size of a DataFrame Two Pointers Python O(n) O(1) Explanation
2879 Display the First Three Rows Array / General Python O(n) O(1) Explanation
2880 Select Data Bit Manipulation Python O(n) O(1) Explanation
2881 Create a New Column Two Pointers Python O(n) O(1) Explanation
2882 Drop Duplicate Rows Array / General Python O(n) O(1) Explanation
2883 Drop Missing Data Bit Manipulation Python O(n) O(1) Explanation
2884 Modify Columns Stack & Queue Python O(n) O(n) Explanation
2885 Rename Columns Tree & Graph Python O(n) O(n) Explanation
2886 Change Data Type Bit Manipulation Python O(n) O(1) Explanation
2887 Fill Missing Data Bit Manipulation Python O(n) O(1) Explanation
2888 Reshape Data: Concatenate Stack & Queue Python O(n) O(n) Explanation
2889 Reshape Data: Pivot Dynamic Programming Python O(n) O(n) Explanation
2890 Reshape Data: Melt Dynamic Programming Python O(n) O(n) Explanation
2891 Method Chaining Hash Map Python O(n) O(n) Explanation
2899 Last Visited Integers Array / General JavaScript O(n) O(1) Explanation
2900 Longest Unequal Adjacent Groups Subsequence I Dynamic Programming JavaScript O(n) O(n) Explanation
2913 Subarrays Distinct Element Sum of Squares I Monotonic Stack JavaScript O(n) O(n) Explanation
2917 Find the K-or of an Array Bit Manipulation Python O(n) O(1) Explanation
2923 Find Champion I Array / General Python O(n) O(1) Explanation
2928 Distribute Candies Among Children I Math & Logic JavaScript O(n) O(1) Explanation
2932 Maximum Strong Pair XOR I Bit Manipulation Python O(n) O(1) Explanation
2946 Matrix Similarity After Cyclic Shifts Stack & Queue JavaScript O(n) O(n) Explanation
2951 Find the Peaks Dynamic Programming Python O(n) O(n) Explanation
2960 Count Tested Devices After Test Operations Array / General JavaScript O(n) O(1) Explanation
2965 Find Missing and Repeated Values Array / General Python O(n) O(1) Explanation
2970 Count the Number of Incremovable Subarrays I Array / General Python O(n) O(1) Explanation
2974 Minimum Number Game Bit Manipulation JavaScript O(n) O(1) Explanation
2980 Check if Bitwise OR Has Trailing Zeros Hash Map Python O(n) O(n) Explanation
2996 Smallest Missing Integer Greater Than Sequential Prefix Sum Prefix Sum Rust O(n) O(n) Explanation
3005 Count Elements With Maximum Frequency Hash Map Python O(n) O(n) Explanation
3010 Divide an Array Into Subarrays With Minimum Cost I Array / General Python O(n) O(1) Explanation
3014 Minimum Number of Pushes to Type Word I Hash Map Dart O(n) O(n) Explanation
3028 Ant on the Boundary Array / General JavaScript O(n) O(1) Explanation
3033 Modify the Matrix Stack & Queue Python O(n) O(n) Explanation
3038 Maximum Number of Operations With the Same Score I Stack & Queue JavaScript O(n) O(n) Explanation
3042 Count Prefix and Suffix Pairs I Prefix Sum Python O(n) O(n) Explanation
3046 Split the Array Array / General Python O(n) O(1) Explanation
3069 Distribute Elements Into Two Arrays I Binary Search Go O(n) O(1) Explanation
3074 Apple Redistribution into Boxes Array / General JavaScript O(n) O(1) Explanation
3090 Maximum Length Substring With Two Occurrences Two Pointers Swift O(n) O(1) Explanation
3095 Shortest Subarray With OR at Least K I Bit Manipulation Python O(n) O(1) Explanation
3105 Longest Strictly Increasing or Strictly Decreasing Subarray Monotonic Stack Python O(n) O(n) Explanation
3114 Latest Time You Can Obtain After Replacing Characters Array / General Python O(n) O(1) Explanation
3120 Count the Number of Special Characters I Hash Map C++ O(n) O(n) Explanation
3127 Make a Square with the Same Color Stack & Queue Python O(n) O(n) Explanation
3142 Check if Grid Satisfies Conditions Stack & Queue Python O(n) O(n) Explanation
3158 Find the XOR of Numbers Which Appear Twice Hash Map Python O(n) O(n) Explanation
3168 Minimum Number of Chairs in a Waiting Room Bit Manipulation JavaScript O(n) O(1) Explanation
3174 Clear Digits Math & Logic Python O(n) O(1) Explanation
3178 Find the Child Who Has the Ball After K Seconds Array / General JavaScript O(n) O(1) Explanation
3184 Count Pairs That Form a Complete Day I Hash Map Python O(n) O(n) Explanation
3200 Maximum Height of a Triangle Tree & Graph Python O(n) O(n) Explanation
3206 Alternating Groups I Bit Manipulation Python O(n) O(1) Explanation
3216 Lexicographically Smallest String After a Swap Array / General JavaScript O(n) O(1) Explanation
3222 Find the Winning Player in Coin Game Array / General Python O(n) O(1) Explanation
3226 Number of Bit Changes to Make Two Integers Equal Bit Manipulation Python O(n) O(1) Explanation
3238 Find the Number of Winning Players Array / General Python O(n) O(1) Explanation
3242 Design Neighbor Sum Service Array / General JavaScript O(n) O(1) Explanation
3248 Snake in Matrix Stack & Queue JavaScript O(n) O(n) Explanation
3258 Count Substrings That Satisfy K-Constraint I Array / General Python O(n) O(1) Explanation
3264 Final Array State After K Multiplication Operations I Two Pointers JavaScript O(n) O(1) Explanation
3300 Minimum Element After Replacement With Digit Sum Math & Logic C++ O(n) O(1) Explanation
3304 Find the K-th Character in String Game I Array / General Python O(n) O(1) Explanation
3314 Construct the Minimum Bitwise Array I Bit Manipulation Python O(n) O(1) Explanation
3318 Find X-Sum of All K-Long Subarrays I Hash Map Python O(n) O(n) Explanation
3345 Smallest Divisible Digit Product I Stack & Queue Ruby O(n) O(n) Explanation
3354 Make Array Elements Equal to Zero Math & Logic JavaScript O(n) O(1) Explanation
3360 Stone Removal Game Array / General JavaScript O(n) O(1) Explanation
3364 Minimum Positive Sum Subarray Array / General Python O(n) O(1) Explanation
3370 Smallest Number With All Set Bits Stack & Queue Python O(n) O(n) Explanation
3379 Transformed Array Array / General JavaScript O(n) O(1) Explanation
3402 Minimum Operations to Make Columns Strictly Increasing Bit Manipulation Python O(n) O(1) Explanation
3407 Substring Matching Pattern Array / General Python O(n) O(1) Explanation
3411 Maximum Subarray With Equal Products Math & Logic JavaScript O(n) O(1) Explanation
3417 Zigzag Grid Traversal With Skip Stack & Queue JavaScript O(n) O(n) Explanation
3427 Sum of Variable Length Subarrays Two Pointers JavaScript O(n) O(1) Explanation
3432 Count Partitions with Even Sum Difference Array / General JavaScript O(n) O(1) Explanation
3436 Find Valid Emails Database / SQL SQL O(n) O(n) Explanation
3438 Find Valid Pair of Adjacent Digits in String Two Pointers JavaScript O(n) O(1) Explanation
3442 Maximum Difference Between Even and Odd Frequency I Hash Map JavaScript O(n) O(n) Explanation
3461 Check If Digits Are Equal in String After Operations I Math & Logic JavaScript O(n) O(1) Explanation
3465 Find Products with Valid Serial Numbers Database / SQL SQL O(n) O(n) Explanation
3467 Transform Array by Parity Array / General JavaScript O(n) O(1) Explanation
3471 Find the Largest Almost Missing Integer Prefix Sum Kotlin O(n) O(n) Explanation
3477 Fruits Into Baskets II Binary Search JavaScript O(n) O(1) Explanation
3483 Unique 3-Digit Even Numbers Math & Logic JavaScript O(n) O(1) Explanation
3487 Maximum Unique Subarray Sum After Deletion Array / General JavaScript O(n) O(1) Explanation
3498 Reverse Degree of a String Array / General Python O(n) O(1) Explanation
3507 Minimum Pair Removal to Sort Array I Array / General Python O(n) O(1) Explanation
3536 Maximum Product of Two Digits Math & Logic Erlang O(n) O(1) Explanation
3541 Find Most Frequent Vowel and Consonant Hash Map JavaScript O(n) O(n) Explanation
3545 Minimum Deletions for At Most K Distinct Characters Hash Map JavaScript O(n) O(n) Explanation
3550 Smallest Index With Digit Sum Equal to Index Prefix Sum JavaScript O(n) O(n) Explanation
3570 Find Books with No Available Copies Array / General Python O(n) O(1) Explanation
3582 Generate Tag for Video Caption Array / General Python O(n) O(1) Explanation
3591 Check if Any Element Has Prime Frequency Hash Map JavaScript O(n) O(n) Explanation
3622 Check Divisibility by Digit Sum and Product Math & Logic C, Python O(n) O(1) Explanation
3633 Earliest Finish Time for Land and Water Rides I Array / General Kotlin O(n) O(1) Explanation
3643 Flip Square Submatrix Vertically Stack & Queue Python O(n) O(n) Explanation
3658 GCD of Odd and Even Sums Two Pointers Kotlin O(n) O(1) Explanation
3663 Find The Least Frequent Digit Hash Map JavaScript O(n) O(n) Explanation
3674 Minimum Operations to Equalize Array Bit Manipulation Python O(n) O(1) Explanation
3684 Maximize Sum of At Most K Distinct Elements Array / General JavaScript O(n) O(1) Explanation
3688 Bitwise OR of Even Numbers in an Array Bit Manipulation Python O(n) O(1) Explanation
3692 Majority Frequency Characters Hash Map JavaScript O(n) O(n) Explanation
3701 Compute Alternating Sum Bit Manipulation Python O(n) O(1) Explanation
3707 Equal Score Substrings Array / General Python O(n) O(1) Explanation
3712 Sum of Elements With Frequency Divisible by K Hash Map JavaScript O(n) O(n) Explanation
3718 Smallest Missing Multiple of K Prefix Sum C# O(n) O(n) Explanation
3726 Remove Zeros in Decimal Representation Bit Manipulation Python O(n) O(1) Explanation
3731 Find Missing Elements Stack & Queue PHP O(n) O(n) Explanation
3736 Minimum Moves to Equal Array Elements III Array / General Python O(n) O(1) Explanation
3745 Maximize Expression of Three Elements Two Pointers Python O(n) O(1) Explanation
3750 Minimum Number of Flips to Reverse Binary String Bit Manipulation Python O(n) O(1) Explanation
3754 Concatenate Non-Zero Digits and Multiply by Sum I Two Pointers Kotlin O(n) O(1) Explanation
3793 Find Users with High Token Usage Database / SQL SQL O(n) O(n) Explanation
3813 Vowel-Consonant Score Array / General Python O(n) O(1) Explanation
3823 Reverse Letters Then Special Characters in a String Array / General Python O(n) O(1) Explanation
3827 Count Monobit Integers Bit Manipulation Python O(n) O(1) Explanation
3833 Count Dominant Indices Stack & Queue Python O(n) O(n) Explanation
3838 Weighted Word Mapping Hash Map Kotlin O(n) O(n) Explanation
3842 Toggle Light Bulbs Array / General Python O(n) O(1) Explanation
3852 Smallest Pair With Different Frequencies Hash Map JavaScript O(n) O(n) Explanation
3866 First Unique Even Element Hash Map JavaScript O(n) O(n) Explanation
3870 Count Commas in Range Stack & Queue JavaScript O(n) O(n) Explanation
3875 Construct Uniform Parity Array I Binary Search C++ O(n) O(1) Explanation
3880 Minimum Absolute Difference Between Two Values Array / General Python O(n) O(1) Explanation
3894 Traffic Signal Color Array / General Python O(n) O(1) Explanation
3898 Find the Degree of Each Vertex Stack & Queue JavaScript O(n) O(n) Explanation
3903 Smallest Stable Index I Dynamic Programming JavaScript O(n) O(n) Explanation
3921 Score Validator Hash Map Python O(n) O(n) Explanation
3925 Concatenate Array With Reverse Two Pointers Python O(n) O(1) Explanation
3950 Exactly One Consecutive Set Bits Pair Bit Manipulation Python O(n) O(1) Explanation
3954 Sum of Compatible Numbers in Range I Bit Manipulation Python O(n) O(1) Explanation
3959 Check Good Integer Tree & Graph Python O(n) O(n) Explanation
3963 Create Grid With Exactly One Path Stack & Queue Python O(n) O(n) Explanation
3978 Unique Middle Element Hash Map JavaScript O(n) O(n) Explanation
4000 Largest Integer With Given Digit Sum Math & Logic JavaScript O(n) O(1) Explanation
4006 Count Valid Prefixes Prefix Sum JavaScript O(n) O(n) Explanation
4010 Maximize Pair Strength Using GCD Two Pointers JavaScript O(n) O(1) Explanation
4020 Elevator Requests I Array / General Python O(n) O(1) Explanation
4024 Nearest Available Drone Array / General Python O(n) O(1) Explanation
4030 Check ASCII Palindromic Stack & Queue Python O(n) O(n) Explanation
4038 Count Integers Appearing in a Single Block Hash Map JavaScript O(n) O(n) Explanation
4043 Count Rotations With Exactly K Equal Adjacent Pairs Array / General Python O(n) O(1) Explanation
4052 Cyclically Shift Rows and Columns Array / General Python O(n) O(1) Explanation
4056 Number of Intersecting Interval Pairs I Dynamic Programming Python O(n) O(n) Explanation
4065 Rearrange Array by Removing Distinct Values Hash Map Python O(n) O(n) Explanation