LeetCode practice notes for problems 300 through 399, including A dynamic programming and patience sorting solution for finding the longest strictly increasing subsequence in an array.
| # | Title | Difficulty | Description |
|---|---|---|---|
| 300 | LeetCode 300: Longest Increasing Subsequence | Medium | A dynamic programming and patience sorting solution for finding the longest strictly increasing subsequence in an array. |
| 301 | LeetCode 301: Remove Invalid Parentheses | Hard | A clear explanation of Remove Invalid Parentheses using BFS to guarantee the minimum number of removals. |
| 302 | LeetCode 302: Smallest Rectangle Enclosing Black Pixels | Hard | A clear explanation of Smallest Rectangle Enclosing Black Pixels using binary search on rows and columns. |
| 303 | LeetCode 303: Range Sum Query - Immutable | Easy | A clear explanation of Range Sum Query - Immutable using prefix sums for constant-time range queries. |
| 304 | LeetCode 304: Range Sum Query 2D - Immutable | Medium | A clear explanation of Range Sum Query 2D - Immutable using a 2D prefix sum matrix for constant-time rectangle queries. |
| 305 | LeetCode 305: Number of Islands II | Hard | A clear explanation of Number of Islands II using Union-Find to dynamically merge connected land cells. |
| 306 | LeetCode 306: Additive Number | Medium | A clear explanation of Additive Number using split enumeration and deterministic checking. |
| 307 | LeetCode 307: Range Sum Query - Mutable | Medium | A clear explanation of Range Sum Query - Mutable using a Fenwick Tree for efficient updates and range sums. |
| 308 | LeetCode 308: Range Sum Query 2D - Mutable | Hard | A clear explanation of Range Sum Query 2D - Mutable using a 2D Fenwick Tree for efficient updates and rectangle sum queries. |
| 309 | LeetCode 309: Best Time to Buy and Sell Stock with Cooldown | Medium | A clear explanation of Best Time to Buy and Sell Stock with Cooldown using dynamic programming states. |
| 310 | LeetCode 310: Minimum Height Trees | Medium | A clear explanation of Minimum Height Trees using leaf trimming to find the center of a tree. |
| 311 | LeetCode 311: Sparse Matrix Multiplication | Medium | A clear explanation of Sparse Matrix Multiplication using non-zero entries to avoid wasted work. |
| 312 | LeetCode 312: Burst Balloons | Hard | A clear explanation of Burst Balloons using interval dynamic programming and the last-burst idea. |
| 313 | LeetCode 313: Super Ugly Number | Medium | A clear explanation of Super Ugly Number using dynamic programming with one pointer per prime. |
| 314 | LeetCode 314: Binary Tree Vertical Order Traversal | Medium | A clear explanation of Binary Tree Vertical Order Traversal using BFS with column indices. |
| 315 | LeetCode 315: Count of Smaller Numbers After Self | Hard | A clear explanation of Count of Smaller Numbers After Self using coordinate compression and a Fenwick Tree. |
| 316 | LeetCode 316: Remove Duplicate Letters | Medium | A clear explanation of Remove Duplicate Letters using a greedy monotonic stack. |
| 317 | LeetCode 317: Shortest Distance from All Buildings | Hard | A clear explanation of Shortest Distance from All Buildings using BFS from each building with distance and reach accumulation. |
| 318 | LeetCode 318: Maximum Product of Word Lengths | Medium | A clear explanation of Maximum Product of Word Lengths using bit masks to test disjoint character sets efficiently. |
| 319 | LeetCode 319: Bulb Switcher | Medium | A clear explanation of Bulb Switcher using divisor parity and perfect squares. |
| 320 | LeetCode 320: Generalized Abbreviation | Medium | A clear explanation of Generalized Abbreviation using backtracking to choose whether each character is kept or abbreviated. |
| 321 | LeetCode 321: Create Maximum Number | Hard | A clear explanation of Create Maximum Number using monotonic stacks for subsequences and greedy merging. |
| 322 | LeetCode 322: Coin Change | Medium | A clear explanation of Coin Change using dynamic programming for minimum coin count. |
| 323 | LeetCode 323: Number of Connected Components in an Undirected Graph | Medium | A clear explanation of counting connected components using Union-Find and graph traversal. |
| 324 | LeetCode 324: Wiggle Sort II | Medium | A clear explanation of Wiggle Sort II using sorting, median splitting, and virtual indexing. |
| 325 | LeetCode 325: Maximum Size Subarray Sum Equals k | Medium | A clear explanation of Maximum Size Subarray Sum Equals k using prefix sums and earliest-index hashing. |
| 326 | LeetCode 326: Power of Three | Easy | A clear explanation of the Power of Three problem using repeated division and integer arithmetic. |
| 327 | LeetCode 327: Count of Range Sum | Hard | A clear explanation of Count of Range Sum using prefix sums and merge sort counting. |
| 328 | LeetCode 328: Odd Even Linked List | Medium | A clear explanation of Odd Even Linked List using in-place pointer rewiring. |
| 329 | LeetCode 329: Longest Increasing Path in a Matrix | Hard | A clear explanation of Longest Increasing Path in a Matrix using DFS with memoization. |
| 330 | LeetCode 330: Patching Array | Hard | A clear explanation of Patching Array using a greedy smallest-missing-sum invariant. |
| 331 | LeetCode 331: Verify Preorder Serialization of a Binary Tree | Medium | A clear explanation of verifying preorder serialization using slot counting without reconstructing the tree. |
| 332 | LeetCode 332: Reconstruct Itinerary | Hard | A clear explanation of Reconstruct Itinerary using a directed graph and Hierholzer’s algorithm. |
| 333 | LeetCode 333: Largest BST Subtree | Medium | A clear explanation of Largest BST Subtree using postorder traversal and subtree state propagation. |
| 334 | LeetCode 334: Increasing Triplet Subsequence | Medium | A clear explanation of Increasing Triplet Subsequence using greedy tracking of two minimum values. |
| 335 | LeetCode 335: Self Crossing | Hard | A clear explanation of Self Crossing using constant-space checks for the only possible crossing patterns. |
| 336 | LeetCode 336: Palindrome Pairs | Hard | A clear explanation of Palindrome Pairs using reversed-word lookup and palindrome split checks. |
| 337 | LeetCode 337: House Robber III | Medium | A clear explanation of House Robber III using tree dynamic programming with rob and skip states. |
| 338 | LeetCode 338: Counting Bits | Easy | A clear explanation of Counting Bits using dynamic programming and bit manipulation. |
| 339 | LeetCode 339: Nested List Weight Sum | Medium | A clear explanation of Nested List Weight Sum using depth-first search over a nested structure. |
| 340 | LeetCode 340: Longest Substring with At Most K Distinct Characters | Medium | A clear explanation of Longest Substring with At Most K Distinct Characters using a sliding window and character counts. |
| 341 | LeetCode 341: Flatten Nested List Iterator | Medium | A clear explanation of Flatten Nested List Iterator using lazy stack-based flattening. |
| 342 | LeetCode 342: Power of Four | Easy | A clear explanation of Power of Four using bit manipulation and binary properties. |
| 343 | LeetCode 343: Integer Break | Medium | A clear explanation of Integer Break using dynamic programming, with a note on the greedy math solution. |
| 344 | LeetCode 344: Reverse String | Easy | A clear explanation of Reverse String using two pointers and in-place swaps. |
| 345 | LeetCode 345: Reverse Vowels of a String | Easy | A clear explanation of Reverse Vowels of a String using two pointers and selective swaps. |
| 346 | LeetCode 346: Moving Average from Data Stream | Easy | A clear explanation of Moving Average from Data Stream using a queue and rolling sum. |
| 347 | LeetCode 347: Top K Frequent Elements | Medium | A clear explanation of Top K Frequent Elements using frequency counting and bucket sort. |
| 348 | LeetCode 348: Design Tic-Tac-Toe | Medium | A clear explanation of Design Tic-Tac-Toe using row, column, and diagonal counters for constant-time winner checks. |
| 349 | LeetCode 349: Intersection of Two Arrays | Easy | A clear explanation of Intersection of Two Arrays using hash sets for uniqueness and fast lookup. |
| 350 | LeetCode 350: Intersection of Two Arrays II | Easy | A clear explanation of Intersection of Two Arrays II using frequency counting. |
| 351 | LeetCode 351: Android Unlock Patterns | Medium | A clear explanation of Android Unlock Patterns using backtracking, a jump table, and symmetry optimization. |
| 352 | LeetCode 352: Data Stream as Disjoint Intervals | Hard | A clear explanation of maintaining disjoint sorted intervals from a stream using insertion and merging. |
| 353 | LeetCode 353: Design Snake Game | Medium | A clear explanation of implementing Snake Game with a deque for body order and a set for constant-time collision checks. |
| 354 | LeetCode 354: Russian Doll Envelopes | Hard | A clear explanation of solving Russian Doll Envelopes using sorting and longest increasing subsequence. |
| 355 | LeetCode 355: Design Twitter | Medium | A clear explanation of implementing a simplified Twitter using hash maps, sets, timestamps, and a heap. |
| 356 | LeetCode 356: Line Reflection | Medium | A clear explanation of checking whether 2D points are symmetric around a vertical line using min and max x-coordinates. |
| 357 | LeetCode 357: Count Numbers with Unique Digits | Medium | A clear explanation of counting numbers with unique digits using combinatorics. |
| 358 | LeetCode 358: Rearrange String k Distance Apart | Hard | A clear explanation of rearranging a string so equal characters are at least k positions apart using a heap and cooldown queue. |
| 359 | LeetCode 359: Logger Rate Limiter | Easy | A clear explanation of designing a logger that prints each message at most once every 10 seconds using a hash map. |
| 360 | LeetCode 360: Sort Transformed Array | Medium | A clear explanation of sorting values after applying a quadratic function using two pointers. |
| 361 | LeetCode 361: Bomb Enemy | Medium | A clear explanation of finding the best bomb placement in a grid using cached row and column segment counts. |
| 362 | LeetCode 362: Design Hit Counter | Medium | A clear explanation of designing a hit counter for the last 5 minutes using a queue with compressed timestamps. |
| 363 | LeetCode 363: Max Sum of Rectangle No Larger Than K | Hard | A clear explanation of reducing a 2D rectangle problem to a 1D prefix-sum problem with binary search. |
| 364 | LeetCode 364: Nested List Weight Sum II | Medium | A clear explanation of computing inverse depth weighted sum using level-order traversal. |
| 365 | LeetCode 365: Water and Jug Problem | Medium | A clear explanation of solving the Water and Jug Problem using Bézout’s identity and greatest common divisor. |
| 366 | LeetCode 366: Find Leaves of Binary Tree | Medium | A clear explanation of grouping binary tree nodes by the round in which they become leaves using postorder DFS. |
| 367 | LeetCode 367: Valid Perfect Square | Easy | A clear explanation of checking whether an integer is a perfect square using binary search without sqrt. |
| 368 | LeetCode 368: Largest Divisible Subset | Medium | A clear explanation of finding the largest subset where every pair is divisible using sorting, dynamic programming, and parent reconstruction. |
| 369 | LeetCode 369: Plus One Linked List | Medium | A clear explanation of adding one to a number stored as a linked list using the rightmost non-nine digit. |
| 370 | LeetCode 370: Range Addition | Medium | A clear explanation of applying many range updates efficiently using a difference array and prefix sums. |
| 371 | LeetCode 371: Sum of Two Integers | Medium | A clear explanation of adding two integers without using plus or minus by using XOR, AND, carry, and a 32-bit mask. |
| 372 | LeetCode 372: Super Pow | Medium | A clear explanation of computing large modular exponentiation using fast power, modular arithmetic, and digit decomposition. |
| 373 | LeetCode 373: Find K Pairs with Smallest Sums | Medium | A clear explanation of finding the k smallest pair sums from two sorted arrays using a min heap and best-first search. |
| 374 | LeetCode 374: Guess Number Higher or Lower | Easy | A clear explanation of finding the picked number using binary search and the guess API. |
| 375 | LeetCode 375: Guess Number Higher or Lower II | Medium | A clear explanation of finding the minimum guaranteed cost using interval dynamic programming. |
| 376 | LeetCode 376: Wiggle Subsequence | Medium | A clear explanation of the Wiggle Subsequence problem using dynamic programming intuition and an optimized greedy solution. |
| 377 | LeetCode 377: Combination Sum IV | Medium | A clear explanation of Combination Sum IV using dynamic programming to count ordered combinations that sum to a target. |
| 378 | LeetCode 378: Kth Smallest Element in a Sorted Matrix | Medium | A clear explanation of finding the kth smallest value in a row-sorted and column-sorted matrix using binary search on values. |
| 379 | LeetCode 379: Design Phone Directory | Medium | A clear explanation of designing a phone directory that can allocate, check, and release numbers efficiently. |
| 380 | LeetCode 380: Insert Delete GetRandom O(1) | Medium | A clear explanation of designing a randomized set with average O(1) insert, remove, and getRandom operations. |
| 381 | LeetCode 381: Insert Delete GetRandom O(1) - Duplicates Allowed | Hard | A clear explanation of designing a randomized multiset with average O(1) insert, remove, and getRandom operations. |
| 382 | LeetCode 382: Linked List Random Node | Medium | A clear explanation of selecting a random linked list node with equal probability using reservoir sampling. |
| 383 | LeetCode 383: Ransom Note | Easy | A clear explanation of checking whether one string can be constructed from another using character frequency counting. |
| 384 | LeetCode 384: Shuffle an Array | Medium | A clear explanation of shuffling an array uniformly using the Fisher-Yates algorithm while supporting reset. |
| 385 | LeetCode 385: Mini Parser | Medium | A clear explanation of parsing a serialized nested integer string using a stack. |
| 386 | LeetCode 386: Lexicographical Numbers | Medium | A clear explanation of generating numbers from 1 to n in lexicographical order using an iterative DFS-style traversal. |
| 387 | LeetCode 387: First Unique Character in a String | Easy | A clear explanation of finding the first non-repeating character in a string using character frequency counting. |
| 388 | LeetCode 388: Longest Absolute File Path | Medium | A clear explanation of computing the longest absolute path to a file from a serialized file system string using path lengths by depth. |
| 389 | LeetCode 389: Find the Difference | Easy | A clear explanation of finding the extra character added to a shuffled string using counting and XOR. |
| 390 | LeetCode 390: Elimination Game | Medium | A clear explanation of finding the last remaining number after alternating left-to-right and right-to-left eliminations. |
| 391 | LeetCode 391: Perfect Rectangle | Hard | A clear explanation of checking whether many small axis-aligned rectangles form one exact rectangular cover using area and corner parity. |
| 392 | LeetCode 392: Is Subsequence | Easy | A clear explanation of checking whether one string is a subsequence of another using two pointers. |
| 393 | LeetCode 393: UTF-8 Validation | Medium | A clear explanation of validating a byte sequence as UTF-8 using bit masks and a continuation-byte counter. |
| 394 | LeetCode 394: Decode String | Medium | A clear explanation of decoding nested repeat expressions using a stack. |
| 395 | LeetCode 395: Longest Substring with At Least K Repeating Characters | Medium | A clear explanation of finding the longest substring where every character appears at least k times using divide and conquer. |
| 396 | LeetCode 396: Rotate Function | Medium | A clear explanation of maximizing the rotation function using a recurrence instead of simulating every rotation. |
| 397 | LeetCode 397: Integer Replacement | Medium | A clear explanation of reducing an integer to 1 with the fewest operations using greedy bit decisions. |
| 398 | LeetCode 398: Random Pick Index | Medium | A clear explanation of picking a uniformly random index for a target value using reservoir sampling, with an alternative hash map approach. |
| 399 | LeetCode 399: Evaluate Division | Medium | A clear explanation of solving division equations using graph traversal and weighted edges. |
LeetCode 300: Longest Increasing SubsequenceA dynamic programming and patience sorting solution for finding the longest strictly increasing subsequence in an array.
LeetCode 301: Remove Invalid ParenthesesA clear explanation of Remove Invalid Parentheses using BFS to guarantee the minimum number of removals.
LeetCode 302: Smallest Rectangle Enclosing Black PixelsA clear explanation of Smallest Rectangle Enclosing Black Pixels using binary search on rows and columns.
LeetCode 303: Range Sum Query - ImmutableA clear explanation of Range Sum Query - Immutable using prefix sums for constant-time range queries.
LeetCode 304: Range Sum Query 2D - ImmutableA clear explanation of Range Sum Query 2D - Immutable using a 2D prefix sum matrix for constant-time rectangle queries.
LeetCode 305: Number of Islands IIA clear explanation of Number of Islands II using Union-Find to dynamically merge connected land cells.
LeetCode 306: Additive NumberA clear explanation of Additive Number using split enumeration and deterministic checking.
LeetCode 307: Range Sum Query - MutableA clear explanation of Range Sum Query - Mutable using a Fenwick Tree for efficient updates and range sums.
LeetCode 308: Range Sum Query 2D - MutableA clear explanation of Range Sum Query 2D - Mutable using a 2D Fenwick Tree for efficient updates and rectangle sum queries.
LeetCode 309: Best Time to Buy and Sell Stock with CooldownA clear explanation of Best Time to Buy and Sell Stock with Cooldown using dynamic programming states.
LeetCode 310: Minimum Height TreesA clear explanation of Minimum Height Trees using leaf trimming to find the center of a tree.
LeetCode 311: Sparse Matrix MultiplicationA clear explanation of Sparse Matrix Multiplication using non-zero entries to avoid wasted work.
LeetCode 312: Burst BalloonsA clear explanation of Burst Balloons using interval dynamic programming and the last-burst idea.
LeetCode 313: Super Ugly NumberA clear explanation of Super Ugly Number using dynamic programming with one pointer per prime.
LeetCode 314: Binary Tree Vertical Order TraversalA clear explanation of Binary Tree Vertical Order Traversal using BFS with column indices.
LeetCode 315: Count of Smaller Numbers After SelfA clear explanation of Count of Smaller Numbers After Self using coordinate compression and a Fenwick Tree.
LeetCode 316: Remove Duplicate LettersA clear explanation of Remove Duplicate Letters using a greedy monotonic stack.
LeetCode 317: Shortest Distance from All BuildingsA clear explanation of Shortest Distance from All Buildings using BFS from each building with distance and reach accumulation.
LeetCode 318: Maximum Product of Word LengthsA clear explanation of Maximum Product of Word Lengths using bit masks to test disjoint character sets efficiently.
LeetCode 319: Bulb SwitcherA clear explanation of Bulb Switcher using divisor parity and perfect squares.
LeetCode 320: Generalized AbbreviationA clear explanation of Generalized Abbreviation using backtracking to choose whether each character is kept or abbreviated.
LeetCode 321: Create Maximum NumberA clear explanation of Create Maximum Number using monotonic stacks for subsequences and greedy merging.
LeetCode 322: Coin ChangeA clear explanation of Coin Change using dynamic programming for minimum coin count.
LeetCode 323: Number of Connected Components in an Undirected GraphA clear explanation of counting connected components using Union-Find and graph traversal.
LeetCode 324: Wiggle Sort IIA clear explanation of Wiggle Sort II using sorting, median splitting, and virtual indexing.
LeetCode 325: Maximum Size Subarray Sum Equals kA clear explanation of Maximum Size Subarray Sum Equals k using prefix sums and earliest-index hashing.
LeetCode 326: Power of ThreeA clear explanation of the Power of Three problem using repeated division and integer arithmetic.
LeetCode 327: Count of Range SumA clear explanation of Count of Range Sum using prefix sums and merge sort counting.
LeetCode 328: Odd Even Linked ListA clear explanation of Odd Even Linked List using in-place pointer rewiring.
LeetCode 329: Longest Increasing Path in a MatrixA clear explanation of Longest Increasing Path in a Matrix using DFS with memoization.
LeetCode 330: Patching ArrayA clear explanation of Patching Array using a greedy smallest-missing-sum invariant.
LeetCode 331: Verify Preorder Serialization of a Binary TreeA clear explanation of verifying preorder serialization using slot counting without reconstructing the tree.
LeetCode 332: Reconstruct ItineraryA clear explanation of Reconstruct Itinerary using a directed graph and Hierholzer's algorithm.
LeetCode 333: Largest BST SubtreeA clear explanation of Largest BST Subtree using postorder traversal and subtree state propagation.
LeetCode 334: Increasing Triplet SubsequenceA clear explanation of Increasing Triplet Subsequence using greedy tracking of two minimum values.
LeetCode 335: Self CrossingA clear explanation of Self Crossing using constant-space checks for the only possible crossing patterns.
LeetCode 336: Palindrome PairsA clear explanation of Palindrome Pairs using reversed-word lookup and palindrome split checks.
LeetCode 337: House Robber IIIA clear explanation of House Robber III using tree dynamic programming with rob and skip states.
LeetCode 338: Counting BitsA clear explanation of Counting Bits using dynamic programming and bit manipulation.
LeetCode 339: Nested List Weight SumA clear explanation of Nested List Weight Sum using depth-first search over a nested structure.
LeetCode 340: Longest Substring with At Most K Distinct CharactersA clear explanation of Longest Substring with At Most K Distinct Characters using a sliding window and character counts.
LeetCode 341: Flatten Nested List IteratorA clear explanation of Flatten Nested List Iterator using lazy stack-based flattening.
LeetCode 342: Power of FourA clear explanation of Power of Four using bit manipulation and binary properties.
LeetCode 343: Integer BreakA clear explanation of Integer Break using dynamic programming, with a note on the greedy math solution.
LeetCode 344: Reverse StringA clear explanation of Reverse String using two pointers and in-place swaps.
LeetCode 345: Reverse Vowels of a StringA clear explanation of Reverse Vowels of a String using two pointers and selective swaps.
LeetCode 346: Moving Average from Data StreamA clear explanation of Moving Average from Data Stream using a queue and rolling sum.
LeetCode 347: Top K Frequent ElementsA clear explanation of Top K Frequent Elements using frequency counting and bucket sort.
LeetCode 348: Design Tic-Tac-ToeA clear explanation of Design Tic-Tac-Toe using row, column, and diagonal counters for constant-time winner checks.
LeetCode 349: Intersection of Two ArraysA clear explanation of Intersection of Two Arrays using hash sets for uniqueness and fast lookup.
LeetCode 350: Intersection of Two Arrays IIA clear explanation of Intersection of Two Arrays II using frequency counting.
LeetCode 351: Android Unlock PatternsA clear explanation of Android Unlock Patterns using backtracking, a jump table, and symmetry optimization.
LeetCode 352: Data Stream as Disjoint IntervalsA clear explanation of maintaining disjoint sorted intervals from a stream using insertion and merging.
LeetCode 353: Design Snake GameA clear explanation of implementing Snake Game with a deque for body order and a set for constant-time collision checks.
LeetCode 354: Russian Doll EnvelopesA clear explanation of solving Russian Doll Envelopes using sorting and longest increasing subsequence.
LeetCode 355: Design TwitterA clear explanation of implementing a simplified Twitter using hash maps, sets, timestamps, and a heap.
LeetCode 356: Line ReflectionA clear explanation of checking whether 2D points are symmetric around a vertical line using min and max x-coordinates.
LeetCode 357: Count Numbers with Unique DigitsA clear explanation of counting numbers with unique digits using combinatorics.
LeetCode 358: Rearrange String k Distance ApartA clear explanation of rearranging a string so equal characters are at least k positions apart using a heap and cooldown queue.
LeetCode 359: Logger Rate LimiterA clear explanation of designing a logger that prints each message at most once every 10 seconds using a hash map.
LeetCode 360: Sort Transformed ArrayA clear explanation of sorting values after applying a quadratic function using two pointers.
LeetCode 361: Bomb EnemyA clear explanation of finding the best bomb placement in a grid using cached row and column segment counts.
LeetCode 362: Design Hit CounterA clear explanation of designing a hit counter for the last 5 minutes using a queue with compressed timestamps.
LeetCode 363: Max Sum of Rectangle No Larger Than KA clear explanation of reducing a 2D rectangle problem to a 1D prefix-sum problem with binary search.
LeetCode 364: Nested List Weight Sum IIA clear explanation of computing inverse depth weighted sum using level-order traversal.
LeetCode 365: Water and Jug ProblemA clear explanation of solving the Water and Jug Problem using Bézout's identity and greatest common divisor.
LeetCode 366: Find Leaves of Binary TreeA clear explanation of grouping binary tree nodes by the round in which they become leaves using postorder DFS.
LeetCode 367: Valid Perfect SquareA clear explanation of checking whether an integer is a perfect square using binary search without sqrt.
LeetCode 368: Largest Divisible SubsetA clear explanation of finding the largest subset where every pair is divisible using sorting, dynamic programming, and parent reconstruction.
LeetCode 369: Plus One Linked ListA clear explanation of adding one to a number stored as a linked list using the rightmost non-nine digit.
LeetCode 370: Range AdditionA clear explanation of applying many range updates efficiently using a difference array and prefix sums.
LeetCode 371: Sum of Two IntegersA clear explanation of adding two integers without using plus or minus by using XOR, AND, carry, and a 32-bit mask.
LeetCode 372: Super PowA clear explanation of computing large modular exponentiation using fast power, modular arithmetic, and digit decomposition.
LeetCode 373: Find K Pairs with Smallest SumsA clear explanation of finding the k smallest pair sums from two sorted arrays using a min heap and best-first search.
LeetCode 374: Guess Number Higher or LowerA clear explanation of finding the picked number using binary search and the guess API.
LeetCode 375: Guess Number Higher or Lower IIA clear explanation of finding the minimum guaranteed cost using interval dynamic programming.
LeetCode 376: Wiggle SubsequenceA clear explanation of the Wiggle Subsequence problem using dynamic programming intuition and an optimized greedy solution.
LeetCode 377: Combination Sum IVA clear explanation of Combination Sum IV using dynamic programming to count ordered combinations that sum to a target.
LeetCode 378: Kth Smallest Element in a Sorted MatrixA clear explanation of finding the kth smallest value in a row-sorted and column-sorted matrix using binary search on values.
LeetCode 379: Design Phone DirectoryA clear explanation of designing a phone directory that can allocate, check, and release numbers efficiently.
LeetCode 380: Insert Delete GetRandom O(1)A clear explanation of designing a randomized set with average O(1) insert, remove, and getRandom operations.
LeetCode 381: Insert Delete GetRandom O(1) - Duplicates AllowedA clear explanation of designing a randomized multiset with average O(1) insert, remove, and getRandom operations.
LeetCode 382: Linked List Random NodeA clear explanation of selecting a random linked list node with equal probability using reservoir sampling.
LeetCode 383: Ransom NoteA clear explanation of checking whether one string can be constructed from another using character frequency counting.
LeetCode 384: Shuffle an ArrayA clear explanation of shuffling an array uniformly using the Fisher-Yates algorithm while supporting reset.
LeetCode 385: Mini ParserA clear explanation of parsing a serialized nested integer string using a stack.
LeetCode 386: Lexicographical NumbersA clear explanation of generating numbers from 1 to n in lexicographical order using an iterative DFS-style traversal.
LeetCode 387: First Unique Character in a StringA clear explanation of finding the first non-repeating character in a string using character frequency counting.
LeetCode 388: Longest Absolute File PathA clear explanation of computing the longest absolute path to a file from a serialized file system string using path lengths by depth.
LeetCode 389: Find the DifferenceA clear explanation of finding the extra character added to a shuffled string using counting and XOR.
LeetCode 390: Elimination GameA clear explanation of finding the last remaining number after alternating left-to-right and right-to-left eliminations.
LeetCode 391: Perfect RectangleA clear explanation of checking whether many small axis-aligned rectangles form one exact rectangular cover using area and corner parity.
LeetCode 392: Is SubsequenceA clear explanation of checking whether one string is a subsequence of another using two pointers.
LeetCode 393: UTF-8 ValidationA clear explanation of validating a byte sequence as UTF-8 using bit masks and a continuation-byte counter.
LeetCode 394: Decode StringA clear explanation of decoding nested repeat expressions using a stack.
LeetCode 395: Longest Substring with At Least K Repeating CharactersA clear explanation of finding the longest substring where every character appears at least k times using divide and conquer.
LeetCode 396: Rotate FunctionA clear explanation of maximizing the rotation function using a recurrence instead of simulating every rotation.
LeetCode 397: Integer ReplacementA clear explanation of reducing an integer to 1 with the fewest operations using greedy bit decisions.
LeetCode 398: Random Pick IndexA clear explanation of picking a uniformly random index for a target value using reservoir sampling, with an alternative hash map approach.
LeetCode 399: Evaluate DivisionA clear explanation of solving division equations using graph traversal and weighted edges.