Skip to content

LeetCode 05xx

LeetCode practice notes for problems 500 through 599, including A clear explanation of filtering words that can be typed using only one row of an American keyboard.

#TitleDifficultyDescription
500LeetCode 500: Keyboard RowEasyA clear explanation of filtering words that can be typed using only one row of an American keyboard.
501LeetCode 501: Find Mode in Binary Search TreeEasyA clear explanation of finding the most frequent value or values in a binary search tree using inorder traversal.
502LeetCode 502: IPOHardA clear explanation of maximizing capital by selecting at most k projects using sorting and a max heap.
503LeetCode 503: Next Greater Element IIMediumA clear explanation of finding the next greater element in a circular array using a monotonic stack.
504LeetCode 504: Base 7EasyA clear explanation of converting an integer into its base 7 string representation using repeated division.
505LeetCode 505: The Maze IIMediumA clear explanation of finding the shortest rolling distance in a maze using Dijkstra’s algorithm.
506LeetCode 506: Relative RanksEasyA clear explanation of assigning athlete ranks from scores using sorting while preserving original indices.
507LeetCode 507: Perfect NumberEasyA clear explanation of checking whether a number equals the sum of its positive divisors excluding itself.
508LeetCode 508: Most Frequent Subtree SumMediumA clear explanation of finding the most frequent subtree sum in a binary tree using postorder DFS and a frequency map.
509LeetCode 509: Fibonacci NumberEasyA clear explanation of computing Fibonacci numbers using dynamic programming and iterative state transitions.
510LeetCode 510: Inorder Successor in BST IIMediumA clear explanation of finding the inorder successor in a binary search tree when nodes contain parent pointers.
511LeetCode 511: Game Play Analysis IEasyA clear explanation of finding each player’s first login date using SQL aggregation.
512LeetCode 512: Game Play Analysis IIEasyA clear explanation of finding the first device used by each player using SQL aggregation and a join.
513LeetCode 513: Find Bottom Left Tree ValueMediumA clear explanation of finding the leftmost value in the deepest row of a binary tree using level-order traversal.
514LeetCode 514: Freedom TrailHardA clear explanation of finding the minimum steps to spell a key on a circular ring using dynamic programming and memoized DFS.
515LeetCode 515: Find Largest Value in Each Tree RowMediumA clear explanation of finding the maximum value at every depth of a binary tree using level-order traversal.
516LeetCode 516: Longest Palindromic SubsequenceMediumA clear explanation of finding the length of the longest palindromic subsequence using interval dynamic programming.
517LeetCode 517: Super Washing MachinesHardA clear explanation of balancing dresses across washing machines using greedy prefix flow.
518LeetCode 518: Coin Change IIMediumA clear explanation of counting coin-change combinations using dynamic programming.
519LeetCode 519: Random Flip MatrixMediumA clear explanation of randomly flipping zero cells in a matrix without repetition using hash mapping and virtual swapping.
520LeetCode 520: Detect CapitalEasyA clear explanation of checking whether a word uses capital letters correctly by counting uppercase letters.
521LeetCode 521: Longest Uncommon Subsequence IEasyA clear explanation of finding the longest uncommon subsequence between two strings using simple case analysis.
522LeetCode 522: Longest Uncommon Subsequence IIMediumA clear explanation of finding the longest uncommon subsequence among many strings using subsequence checks.
523LeetCode 523: Continuous Subarray SumMediumA clear explanation of detecting a subarray whose sum is a multiple of k using prefix sums and modular arithmetic.
524LeetCode 524: Longest Word in Dictionary through DeletingMediumA clear explanation of finding the longest dictionary word obtainable as a subsequence using two pointers and sorting rules.
525LeetCode 525: Contiguous ArrayMediumA clear explanation of finding the longest contiguous subarray with equal numbers of 0 and 1 using prefix sums and a hash map.
526LeetCode 526: Beautiful ArrangementMediumA clear explanation of counting beautiful arrangements using backtracking and divisibility pruning.
527LeetCode 527: Word AbbreviationHardA clear explanation of generating minimal unique word abbreviations using grouping and trie prefixes.
528LeetCode 528: Random Pick with WeightMediumA clear explanation of weighted random sampling using prefix sums and binary search.
529LeetCode 529: MinesweeperMediumA clear explanation of updating a Minesweeper board using DFS flood fill and adjacent mine counting.
530LeetCode 530: Minimum Absolute Difference in BSTEasyA clear explanation of finding the minimum difference between two BST node values using inorder traversal.
531LeetCode 531: Lonely Pixel IMediumA clear explanation of counting black pixels that are alone in both their row and column.
532LeetCode 532: K-diff Pairs in an ArrayMediumA clear explanation of counting unique pairs whose absolute difference is k using frequency counting.
533LeetCode 533: Lonely Pixel IIMediumA clear explanation of counting black lonely pixels using row counts, column counts, and duplicate row patterns.
534LeetCode 534: Game Play Analysis IIIMediumA clear explanation of computing cumulative games played per player and date using SQL window functions.
535LeetCode 535: Encode and Decode TinyURLMediumA clear explanation of designing a simple URL encoder and decoder using a hash map and generated keys.
536LeetCode 536: Construct Binary Tree from StringMediumA clear explanation of parsing a parenthesized string recursively to construct a binary tree.
537LeetCode 537: Complex Number MultiplicationMediumA clear explanation of multiplying complex numbers represented as strings using algebraic expansion.
538LeetCode 538: Convert BST to Greater TreeMediumA clear explanation of converting a BST into a greater tree using reverse inorder traversal and a running sum.
539LeetCode 539: Minimum Time DifferenceMediumA clear explanation of finding the minimum difference between 24-hour clock times using minute conversion and sorting.
540LeetCode 540: Single Element in a Sorted ArrayMediumA clear explanation of finding the only non-duplicate element in a sorted array using binary search.
541LeetCode 541: Reverse String IIEasyA clear explanation of reversing the first k characters in every 2k block of a string.
542LeetCode 542: 01 MatrixMediumA clear explanation of computing the distance to the nearest zero in a binary matrix using multi-source BFS.
543LeetCode 543: Diameter of Binary TreeEasyA clear explanation of finding the longest path between any two nodes in a binary tree using DFS height computation.
544LeetCode 544: Output Contest MatchesMediumA clear explanation of building the final tournament bracket by repeatedly pairing strongest and weakest teams.
545LeetCode 545: Boundary of Binary TreeMediumA clear explanation of collecting the boundary of a binary tree using separate left boundary, leaves, and right boundary traversals.
546LeetCode 546: Remove BoxesHardA clear explanation of maximizing remove-box scores using interval dynamic programming with memoization.
547LeetCode 547: Number of ProvincesMediumA clear explanation of counting connected components in an undirected graph represented by an adjacency matrix.
548LeetCode 548: Split Array with Equal SumHardA clear explanation of splitting an array into four equal-sum parts using prefix sums and set-based search.
549LeetCode 549: Binary Tree Longest Consecutive Sequence IIMediumA clear explanation of finding the longest increasing or decreasing consecutive path in a binary tree using DFS.
550LeetCode 550: Game Play Analysis IVMediumA clear explanation of calculating the fraction of players who logged in again the day after their first login.
551LeetCode 551: Student Attendance Record IEasyA clear explanation of Student Attendance Record I using simple string checks and a one-pass counter solution.
552LeetCode 552: Student Attendance Record IIHardA clear explanation of Student Attendance Record II using dynamic programming over absence count and late streak.
553LeetCode 553: Optimal DivisionMediumA clear explanation of Optimal Division using the structure of division expressions to build the maximum-value expression.
554LeetCode 554: Brick WallMediumA clear explanation of Brick Wall using prefix sums and a hash map to find the best vertical cut position.
555LeetCode 555: Split Concatenated StringsMediumA clear explanation of Split Concatenated Strings using string reversal choices and enumeration of every possible cut point.
556LeetCode 556: Next Greater Element IIIMediumA clear explanation of Next Greater Element III using the next permutation algorithm on the digits of an integer.
557LeetCode 557: Reverse Words in a String IIIEasyA clear explanation of Reverse Words in a String III using two-pointer scanning and string reversal.
558LeetCode 558: Logical OR of Two Binary Grids Represented as Quad-TreesMediumA clear explanation of merging two quad-trees using recursive logical OR operations.
559LeetCode 559: Maximum Depth of N-ary TreeEasyA clear explanation of Maximum Depth of N-ary Tree using recursive depth-first search.
560LeetCode 560: Subarray Sum Equals KMediumA clear explanation of Subarray Sum Equals K using prefix sums and a hash map to count matching subarrays in linear time.
561LeetCode 561: Array PartitionEasyA clear explanation of Array Partition using sorting and adjacent pairing to maximize the sum of pair minimums.
562LeetCode 562: Longest Line of Consecutive One in MatrixMediumA clear explanation of Longest Line of Consecutive One in Matrix using dynamic programming over four directions.
563LeetCode 563: Binary Tree TiltEasyA clear explanation of Binary Tree Tilt using postorder DFS to compute subtree sums and accumulate tilt.
564LeetCode 564: Find the Closest PalindromeHardA clear explanation of Find the Closest Palindrome using prefix mirroring and a small candidate set.
565LeetCode 565: Array NestingMediumA clear explanation of Array Nesting using cycle detection over a permutation.
566LeetCode 566: Reshape the MatrixEasyA clear explanation of Reshape the Matrix using index mapping from the original matrix to the reshaped matrix.
567LeetCode 567: Permutation in StringMediumA clear explanation of Permutation in String using a fixed-size sliding window and character frequency counts.
568LeetCode 568: Maximum Vacation DaysHardA clear explanation of Maximum Vacation Days using dynamic programming over weeks and cities.
569LeetCode 569: Median Employee SalaryHardA clear explanation of Median Employee Salary using SQL window functions to rank employees inside each company.
570LeetCode 570: Managers with at Least 5 Direct ReportsMediumA clear explanation of Managers with at Least 5 Direct Reports using grouping and a self join.
571LeetCode 571: Find Median Given Frequency of NumbersHardA clear explanation of Find Median Given Frequency of Numbers using cumulative frequency and SQL window functions.
572LeetCode 572: Subtree of Another TreeEasyA clear explanation of Subtree of Another Tree using recursive tree matching and DFS.
573LeetCode 573: Squirrel SimulationMediumA clear explanation of Squirrel Simulation using Manhattan distance and the special first trip.
574LeetCode 574: Winning CandidateMediumA clear explanation of Winning Candidate using SQL aggregation to count votes and return the candidate with the most votes.
575LeetCode 575: Distribute CandiesEasyA clear explanation of Distribute Candies using a set to count candy types and a simple limit argument.
576LeetCode 576: Out of Boundary PathsMediumA clear dynamic programming solution for counting paths that move a ball out of a grid boundary.
577LeetCode 577: Employee BonusEasyA clear SQL guide for finding employees whose bonus is less than 1000 or missing.
578LeetCode 578: Get Highest Answer Rate QuestionMediumA clear SQL guide for finding the question with the highest answer rate from survey logs.
579LeetCode 579: Find Cumulative Salary of an EmployeeHardA clear SQL guide for computing each employee’s 3-month cumulative salary while excluding their most recent month.
580LeetCode 580: Count Student Number in DepartmentsMediumA clear SQL guide for counting students in every department, including departments with zero students.
581LeetCode 581: Shortest Unsorted Continuous SubarrayMediumA clear linear-time solution for finding the shortest subarray that must be sorted to make the whole array sorted.
582LeetCode 582: Kill ProcessMediumA clear graph traversal solution for finding all processes terminated when killing a target process.
583LeetCode 583: Delete Operation for Two StringsMediumA clear dynamic programming solution for finding the minimum deletions needed to make two strings equal.
584LeetCode 584: Find Customer RefereeEasyA clear SQL guide for selecting customers who were not referred by customer 2, including customers with no referee.
585LeetCode 585: Investments in 2016MediumA clear SQL guide for summing 2016 investments for policies with repeated 2015 investment values and unique locations.
586LeetCode 586: Customer Placing the Largest Number of OrdersEasyA clear SQL guide for finding the customer who placed the most orders.
587LeetCode 587: Erect the FenceHardA clear convex hull solution for returning all trees that lie on the fence boundary.
588LeetCode 588: Design In-Memory File SystemHardA clear design guide for implementing an in-memory file system with directory listing, directory creation, file append, and file read operations.
589LeetCode 589: N-ary Tree Preorder TraversalEasyA clear DFS solution for returning the preorder traversal of an N-ary tree.
590LeetCode 590: N-ary Tree Postorder TraversalEasyA clear DFS solution for returning the postorder traversal of an N-ary tree.
591LeetCode 591: Tag ValidatorHardA clear stack-based parser for validating nested XML-like tags with CDATA sections.
592LeetCode 592: Fraction Addition and SubtractionMediumA clear parsing and math solution for evaluating fraction addition and subtraction expressions.
593LeetCode 593: Valid SquareMediumA clear geometry solution for checking whether four unordered points form a valid square.
594LeetCode 594: Longest Harmonious SubsequenceEasyA clear hash map solution for finding the longest subsequence whose maximum and minimum differ by exactly one.
595LeetCode 595: Big CountriesEasyA clear SQL guide for finding countries with either large area or large population.
596LeetCode 596: Classes With at Least 5 StudentsEasyA clear SQL guide for finding classes that have at least five students.
597LeetCode 597: Friend Requests I: Overall Acceptance RateEasyA clear SQL guide for computing the overall friend request acceptance rate with duplicate pairs counted once.
598LeetCode 598: Range Addition IIEasyA clear math solution for counting the maximum values after repeated top-left matrix increment operations.
599LeetCode 599: Minimum Index Sum of Two ListsEasyA clear hash map solution for finding common strings with the smallest index sum.
LeetCode 500: Keyboard RowA clear explanation of filtering words that can be typed using only one row of an American keyboard.
4 min
LeetCode 501: Find Mode in Binary Search TreeA clear explanation of finding the most frequent value or values in a binary search tree using inorder traversal.
5 min
LeetCode 502: IPOA clear explanation of maximizing capital by selecting at most k projects using sorting and a max heap.
6 min
LeetCode 503: Next Greater Element IIA clear explanation of finding the next greater element in a circular array using a monotonic stack.
5 min
LeetCode 504: Base 7A clear explanation of converting an integer into its base 7 string representation using repeated division.
3 min
LeetCode 505: The Maze IIA clear explanation of finding the shortest rolling distance in a maze using Dijkstra’s algorithm.
6 min
LeetCode 506: Relative RanksA clear explanation of assigning athlete ranks from scores using sorting while preserving original indices.
4 min
LeetCode 507: Perfect NumberA clear explanation of checking whether a number equals the sum of its positive divisors excluding itself.
4 min
LeetCode 508: Most Frequent Subtree SumA clear explanation of finding the most frequent subtree sum in a binary tree using postorder DFS and a frequency map.
4 min
LeetCode 509: Fibonacci NumberA clear explanation of computing Fibonacci numbers using dynamic programming and iterative state transitions.
3 min
LeetCode 510: Inorder Successor in BST IIA clear explanation of finding the inorder successor in a binary search tree when nodes contain parent pointers.
5 min
LeetCode 511: Game Play Analysis IA clear explanation of finding each player's first login date using SQL aggregation.
3 min
LeetCode 512: Game Play Analysis IIA clear explanation of finding the first device used by each player using SQL aggregation and a join.
4 min
LeetCode 513: Find Bottom Left Tree ValueA clear explanation of finding the leftmost value in the deepest row of a binary tree using level-order traversal.
5 min
LeetCode 514: Freedom TrailA clear explanation of finding the minimum steps to spell a key on a circular ring using dynamic programming and memoized DFS.
6 min
LeetCode 515: Find Largest Value in Each Tree RowA clear explanation of finding the maximum value at every depth of a binary tree using level-order traversal.
4 min
LeetCode 516: Longest Palindromic SubsequenceA clear explanation of finding the length of the longest palindromic subsequence using interval dynamic programming.
4 min
LeetCode 517: Super Washing MachinesA clear explanation of balancing dresses across washing machines using greedy prefix flow.
5 min
LeetCode 518: Coin Change IIA clear explanation of counting coin-change combinations using dynamic programming.
5 min
LeetCode 519: Random Flip MatrixA clear explanation of randomly flipping zero cells in a matrix without repetition using hash mapping and virtual swapping.
5 min
LeetCode 520: Detect CapitalA clear explanation of checking whether a word uses capital letters correctly by counting uppercase letters.
4 min
LeetCode 521: Longest Uncommon Subsequence IA clear explanation of finding the longest uncommon subsequence between two strings using simple case analysis.
4 min
LeetCode 522: Longest Uncommon Subsequence IIA clear explanation of finding the longest uncommon subsequence among many strings using subsequence checks.
5 min
LeetCode 523: Continuous Subarray SumA clear explanation of detecting a subarray whose sum is a multiple of k using prefix sums and modular arithmetic.
5 min
LeetCode 524: Longest Word in Dictionary through DeletingA clear explanation of finding the longest dictionary word obtainable as a subsequence using two pointers and sorting rules.
4 min
LeetCode 525: Contiguous ArrayA clear explanation of finding the longest contiguous subarray with equal numbers of 0 and 1 using prefix sums and a hash map.
5 min
LeetCode 526: Beautiful ArrangementA clear explanation of counting beautiful arrangements using backtracking and divisibility pruning.
6 min
LeetCode 527: Word AbbreviationA clear explanation of generating minimal unique word abbreviations using grouping and trie prefixes.
5 min
LeetCode 528: Random Pick with WeightA clear explanation of weighted random sampling using prefix sums and binary search.
6 min
LeetCode 529: MinesweeperA clear explanation of updating a Minesweeper board using DFS flood fill and adjacent mine counting.
8 min
LeetCode 530: Minimum Absolute Difference in BSTA clear explanation of finding the minimum difference between two BST node values using inorder traversal.
5 min
LeetCode 531: Lonely Pixel IA clear explanation of counting black pixels that are alone in both their row and column.
5 min
LeetCode 532: K-diff Pairs in an ArrayA clear explanation of counting unique pairs whose absolute difference is k using frequency counting.
6 min
LeetCode 533: Lonely Pixel IIA clear explanation of counting black lonely pixels using row counts, column counts, and duplicate row patterns.
7 min
LeetCode 534: Game Play Analysis IIIA clear explanation of computing cumulative games played per player and date using SQL window functions.
5 min
LeetCode 535: Encode and Decode TinyURLA clear explanation of designing a simple URL encoder and decoder using a hash map and generated keys.
5 min
LeetCode 536: Construct Binary Tree from StringA clear explanation of parsing a parenthesized string recursively to construct a binary tree.
5 min
LeetCode 537: Complex Number MultiplicationA clear explanation of multiplying complex numbers represented as strings using algebraic expansion.
4 min
LeetCode 538: Convert BST to Greater TreeA clear explanation of converting a BST into a greater tree using reverse inorder traversal and a running sum.
5 min
LeetCode 539: Minimum Time DifferenceA clear explanation of finding the minimum difference between 24-hour clock times using minute conversion and sorting.
5 min
LeetCode 540: Single Element in a Sorted ArrayA clear explanation of finding the only non-duplicate element in a sorted array using binary search.
5 min
LeetCode 541: Reverse String IIA clear explanation of reversing the first k characters in every 2k block of a string.
5 min
LeetCode 542: 01 MatrixA clear explanation of computing the distance to the nearest zero in a binary matrix using multi-source BFS.
6 min
LeetCode 543: Diameter of Binary TreeA clear explanation of finding the longest path between any two nodes in a binary tree using DFS height computation.
5 min
LeetCode 544: Output Contest MatchesA clear explanation of building the final tournament bracket by repeatedly pairing strongest and weakest teams.
5 min
LeetCode 545: Boundary of Binary TreeA clear explanation of collecting the boundary of a binary tree using separate left boundary, leaves, and right boundary traversals.
6 min
LeetCode 546: Remove BoxesA clear explanation of maximizing remove-box scores using interval dynamic programming with memoization.
7 min
LeetCode 547: Number of ProvincesA clear explanation of counting connected components in an undirected graph represented by an adjacency matrix.
5 min
LeetCode 548: Split Array with Equal SumA clear explanation of splitting an array into four equal-sum parts using prefix sums and set-based search.
5 min
LeetCode 549: Binary Tree Longest Consecutive Sequence IIA clear explanation of finding the longest increasing or decreasing consecutive path in a binary tree using DFS.
6 min
LeetCode 550: Game Play Analysis IVA clear explanation of calculating the fraction of players who logged in again the day after their first login.
5 min
LeetCode 551: Student Attendance Record IA clear explanation of Student Attendance Record I using simple string checks and a one-pass counter solution.
4 min
LeetCode 552: Student Attendance Record IIA clear explanation of Student Attendance Record II using dynamic programming over absence count and late streak.
6 min
LeetCode 553: Optimal DivisionA clear explanation of Optimal Division using the structure of division expressions to build the maximum-value expression.
5 min
LeetCode 554: Brick WallA clear explanation of Brick Wall using prefix sums and a hash map to find the best vertical cut position.
6 min
LeetCode 555: Split Concatenated StringsA clear explanation of Split Concatenated Strings using string reversal choices and enumeration of every possible cut point.
5 min
LeetCode 556: Next Greater Element IIIA clear explanation of Next Greater Element III using the next permutation algorithm on the digits of an integer.
6 min
LeetCode 557: Reverse Words in a String IIIA clear explanation of Reverse Words in a String III using two-pointer scanning and string reversal.
3 min
LeetCode 558: Logical OR of Two Binary Grids Represented as Quad-TreesA clear explanation of merging two quad-trees using recursive logical OR operations.
6 min
LeetCode 559: Maximum Depth of N-ary TreeA clear explanation of Maximum Depth of N-ary Tree using recursive depth-first search.
4 min
LeetCode 560: Subarray Sum Equals KA clear explanation of Subarray Sum Equals K using prefix sums and a hash map to count matching subarrays in linear time.
5 min
LeetCode 561: Array PartitionA clear explanation of Array Partition using sorting and adjacent pairing to maximize the sum of pair minimums.
4 min
LeetCode 562: Longest Line of Consecutive One in MatrixA clear explanation of Longest Line of Consecutive One in Matrix using dynamic programming over four directions.
6 min
LeetCode 563: Binary Tree TiltA clear explanation of Binary Tree Tilt using postorder DFS to compute subtree sums and accumulate tilt.
5 min
LeetCode 564: Find the Closest PalindromeA clear explanation of Find the Closest Palindrome using prefix mirroring and a small candidate set.
6 min
LeetCode 565: Array NestingA clear explanation of Array Nesting using cycle detection over a permutation.
5 min
LeetCode 566: Reshape the MatrixA clear explanation of Reshape the Matrix using index mapping from the original matrix to the reshaped matrix.
5 min
LeetCode 567: Permutation in StringA clear explanation of Permutation in String using a fixed-size sliding window and character frequency counts.
6 min
LeetCode 568: Maximum Vacation DaysA clear explanation of Maximum Vacation Days using dynamic programming over weeks and cities.
6 min
LeetCode 569: Median Employee SalaryA clear explanation of Median Employee Salary using SQL window functions to rank employees inside each company.
6 min
LeetCode 570: Managers with at Least 5 Direct ReportsA clear explanation of Managers with at Least 5 Direct Reports using grouping and a self join.
4 min
LeetCode 571: Find Median Given Frequency of NumbersA clear explanation of Find Median Given Frequency of Numbers using cumulative frequency and SQL window functions.
5 min
LeetCode 572: Subtree of Another TreeA clear explanation of Subtree of Another Tree using recursive tree matching and DFS.
6 min
LeetCode 573: Squirrel SimulationA clear explanation of Squirrel Simulation using Manhattan distance and the special first trip.
6 min
LeetCode 574: Winning CandidateA clear explanation of Winning Candidate using SQL aggregation to count votes and return the candidate with the most votes.
4 min
LeetCode 575: Distribute CandiesA clear explanation of Distribute Candies using a set to count candy types and a simple limit argument.
4 min
LeetCode 576: Out of Boundary PathsA clear dynamic programming solution for counting paths that move a ball out of a grid boundary.
6 min
LeetCode 577: Employee BonusA clear SQL guide for finding employees whose bonus is less than 1000 or missing.
4 min
LeetCode 578: Get Highest Answer Rate QuestionA clear SQL guide for finding the question with the highest answer rate from survey logs.
5 min
LeetCode 579: Find Cumulative Salary of an EmployeeA clear SQL guide for computing each employee's 3-month cumulative salary while excluding their most recent month.
6 min
LeetCode 580: Count Student Number in DepartmentsA clear SQL guide for counting students in every department, including departments with zero students.
4 min
LeetCode 581: Shortest Unsorted Continuous SubarrayA clear linear-time solution for finding the shortest subarray that must be sorted to make the whole array sorted.
5 min
LeetCode 582: Kill ProcessA clear graph traversal solution for finding all processes terminated when killing a target process.
4 min
LeetCode 583: Delete Operation for Two StringsA clear dynamic programming solution for finding the minimum deletions needed to make two strings equal.
6 min
LeetCode 584: Find Customer RefereeA clear SQL guide for selecting customers who were not referred by customer 2, including customers with no referee.
3 min
LeetCode 585: Investments in 2016A clear SQL guide for summing 2016 investments for policies with repeated 2015 investment values and unique locations.
5 min
LeetCode 586: Customer Placing the Largest Number of OrdersA clear SQL guide for finding the customer who placed the most orders.
3 min
LeetCode 587: Erect the FenceA clear convex hull solution for returning all trees that lie on the fence boundary.
6 min
LeetCode 588: Design In-Memory File SystemA clear design guide for implementing an in-memory file system with directory listing, directory creation, file append, and file read operations.
7 min
LeetCode 589: N-ary Tree Preorder TraversalA clear DFS solution for returning the preorder traversal of an N-ary tree.
4 min
LeetCode 590: N-ary Tree Postorder TraversalA clear DFS solution for returning the postorder traversal of an N-ary tree.
5 min
LeetCode 591: Tag ValidatorA clear stack-based parser for validating nested XML-like tags with CDATA sections.
6 min
LeetCode 592: Fraction Addition and SubtractionA clear parsing and math solution for evaluating fraction addition and subtraction expressions.
5 min
LeetCode 593: Valid SquareA clear geometry solution for checking whether four unordered points form a valid square.
5 min
LeetCode 594: Longest Harmonious SubsequenceA clear hash map solution for finding the longest subsequence whose maximum and minimum differ by exactly one.
5 min
LeetCode 595: Big CountriesA clear SQL guide for finding countries with either large area or large population.
3 min
LeetCode 596: Classes With at Least 5 StudentsA clear SQL guide for finding classes that have at least five students.
3 min
LeetCode 597: Friend Requests I: Overall Acceptance RateA clear SQL guide for computing the overall friend request acceptance rate with duplicate pairs counted once.
5 min
LeetCode 598: Range Addition IIA clear math solution for counting the maximum values after repeated top-left matrix increment operations.
5 min
LeetCode 599: Minimum Index Sum of Two ListsA clear hash map solution for finding common strings with the smallest index sum.
5 min