LeetCode 05xx

LeetCode problems 500–599

100 items

LeetCode 05xx

# Problem Difficulty Time Notes
500 Keyboard Row 🟢 Easy 1m This problem asks us to determine which words in a given list can b…
501 Find Mode in Binary Search Tree 🟢 Easy 55s This problem asks us to find the mode(s) in a Binary Search Tree (B…
502 IPO 🔴 Hard 1m 16s The problem describes a scenario where we have a limited number of …
503 Next Greater Element II 🟡 Medium 1m 20s The problem gives us a circular array nums, and for every element, …
504 Base 7 🟢 Easy 38s The problem asks us to convert a given integer num into its represe…
505 The Maze II 🟡 Medium 35s This problem presents a maze represented as a 2D grid of size m x n…
506 Relative Ranks 🟢 Easy 1m 2s The problem gives us an array named score, where each element repre…
507 Perfect Number 🟢 Easy 52s This problem asks us to determine whether a given positive integer …
508 Most Frequent Subtree Sum 🟡 Medium 1m 7s The problem asks us to compute the subtree sum for every node in a …
509 Fibonacci Number 🟢 Easy 56s This problem asks us to compute the nth Fibonacci number. The Fibon…
510 Inorder Successor in BST II 🟡 Medium 1m 14s This problem asks us to find the in-order successor of a given node…
511 Game Play Analysis I 🟢 Easy 1m 6s This problem asks us to determine the first day each player logged …
512 Game Play Analysis II 🟢 Easy 3m 3s The problem provides a database table named Activity. Each row repr…
513 Find Bottom Left Tree Value 🟡 Medium 49s The problem asks us to find the leftmost value in the last row of a…
514 Freedom Trail 🔴 Hard 1m 22s The problem models a circular dial, represented by the string ring,…
515 Find Largest Value in Each Tree Row 🟡 Medium 44s The problem asks us to find the largest value in each row of a bina…
516 Longest Palindromic Subsequence 🟡 Medium 42s The problem asks us to determine the length of the longest palindro…
517 Super Washing Machines 🔴 Hard 1m 56s The problem gives us a line of washing machines, where each machine…
518 Coin Change II 🟡 Medium 1m 19s This problem asks us to compute the number of distinct combinations…
519 Random Flip Matrix 🟡 Medium 3m 39s The problem gives us an m x n matrix where every cell initially con…
520 Detect Capital 🟢 Easy 1m 21s only conditions are satisfied.
521 Longest Uncommon Subsequence I 🟢 Easy 51s The problem asks us to find the length of the longest uncommon subs…
522 Longest Uncommon Subsequence II 🟡 Medium 53s The problem asks us to find the length of the longest string in the…
523 Continuous Subarray Sum 🟡 Medium 1m 7s The problem asks us to determine whether an array contains a contin…
524 Longest Word in Dictionary through Deleting 🟡 Medium 57s The problem gives us a source string s and a list of candidate word…
525 Contiguous Array 🟡 Medium 1m 24s This problem asks us to find the maximum length of a contiguous sub…
526 Beautiful Arrangement 🟡 Medium 1m 9s The problem asks us to count how many permutations of the integers …
527 Word Abbreviation 🔴 Hard 19m 21s The problem asks us to compute minimal unique abbreviations for an …
528 Random Pick with Weight 🟡 Medium 52s The problem asks us to design a data structure that supports weight…
529 Minesweeper 🟡 Medium 1m 9s This problem asks us to simulate one move in the classic Minesweepe…
530 Minimum Absolute Difference in BST 🟢 Easy 1m 47s This problem gives us the root node of a Binary Search Tree, abbrev…
531 Lonely Pixel I 🟡 Medium 1m 7s The problem gives us a 2D grid called picture, where each cell cont…
532 K-diff Pairs in an Array 🟡 Medium 54s The problem asks us to count how many unique pairs of integers in t…
533 Lonely Pixel II 🟡 Medium 2m 6s The problem gives us a matrix called picture, where each cell conta…
534 Game Play Analysis III 🟡 Medium 33s The problem is asking us to track cumulative game activity for each…
535 Encode and Decode TinyURL 🟡 Medium 40s The problem asks us to implement a URL shortening service, similar …
536 Construct Binary Tree from String 🟡 Medium 1m 2s This problem asks us to reconstruct a binary tree from a specially …
537 Complex Number Multiplication 🟡 Medium 50s This problem asks us to multiply two complex numbers represented as…
538 Convert BST to Greater Tree 🟡 Medium 1m 6s This problem asks us to transform a Binary Search Tree, abbreviated…
539 Minimum Time Difference 🟡 Medium 5m 19s The problem gives a list of time points in 24-hour clock format, wh…
540 Single Element in a Sorted Array 🟡 Medium 2m 19s The problem gives us a sorted integer array where every value appea…
541 Reverse String II 🟢 Easy 1m 22s The problem requires us to manipulate a string s in a structured wa…
542 01 Matrix 🟡 Medium 1m 8s This problem gives us an m x n binary matrix where every cell conta…
543 Diameter of Binary Tree 🟢 Easy 1m 26s The problem asks us to compute the diameter of a binary tree. The d…
544 Output Contest Matches 🟡 Medium 1m 5s The problem asks us to simulate the structure of a playoff tourname…
545 Boundary of Binary Tree 🟡 Medium 1m 9s This problem asks us to compute the boundary traversal of a binary …
546 Remove Boxes 🔴 Hard 1m 24s The problem gives us an array called boxes, where each integer repr…
547 Number of Provinces 🟡 Medium 1m 52s The problem is asking us to determine the number of provinces in a …
548 Split Array with Equal Sum 🔴 Hard 37s The problem asks us to determine whether an integer array nums can …
549 Binary Tree Longest Consecutive Sequence II 🟡 Medium 1m 21s This problem asks us to find the length of the longest consecutive …
550 Game Play Analysis IV 🟡 Medium 2m 24s This problem is asking us to calculate a retention metric from a ta…
551 Student Attendance Record I 🟢 Easy 3m 32s The problem gives us a string s where each character represents a s…
552 Student Attendance Record II 🔴 Hard 1m 10s The problem asks us to count how many attendance records of length …
553 Optimal Division 🟡 Medium 1m 46s The problem gives us an array of positive integers, and the array e…
554 Brick Wall 🟡 Medium 1m 11s The problem gives us a wall made of multiple rows of bricks. Each r…
555 Split Concatenated Strings 🟡 Medium 1m 21s The problem gives an array of strings, and we must arrange them int…
556 Next Greater Element III 🟡 Medium 1m 5s This problem asks us to find the smallest integer that is strictly …
557 Reverse Words in a String III 🟢 Easy 47s The problem requires reversing the characters of each individual wo…
558 Logical OR of Two Binary Grids Represented as Quad-Trees 🟡 Medium 1m 27s This problem gives us two Quad-Trees, where each tree represents a …
559 Maximum Depth of N-ary Tree 🟢 Easy 1m 18s The problem asks us to compute the maximum depth of an n-ary tree. …
560 Subarray Sum Equals K 🟡 Medium 1m 3s The problem asks us to count how many contiguous, non-empty subarra…
561 Array Partition 🟢 Easy 1m 6s The problem gives an array nums containing 2n integers. Our task is…
562 Longest Line of Consecutive One in Matrix 🟡 Medium 1m 13s The problem gives us a binary matrix mat of size m x n, where every…
563 Binary Tree Tilt 🟢 Easy 1m 7s The problem asks us to compute the total tilt of an entire binary t…
564 Find the Closest Palindrome 🔴 Hard 1m 29s The problem gives us a string n representing a positive integer, an…
565 Array Nesting 🟡 Medium 2m 41s The problem gives us an array nums that is guaranteed to be a permu…
566 Reshape the Matrix 🟢 Easy 40s The problem is asking us to take an existing m x n matrix and "resh…
567 Permutation in String 🟡 Medium 3m 37s This problem asks us to determine whether any permutation of s1 app…
568 Maximum Vacation Days 🔴 Hard 1m 11s This problem asks us to maximize the total number of vacation days …
569 Median Employee Salary 🔴 Hard 1m 12s The problem gives us an Employee table containing three columns:
570 Managers with at Least 5 Direct Reports 🟡 Medium 1m 8s The Employee table represents a company hierarchy. Every row corres…
571 Find Median Given Frequency of Numbers 🔴 Hard 2m 31s This problem provides a compressed representation of a dataset inst…
572 Subtree of Another Tree 🟢 Easy 1m 12s This problem asks us to determine whether one binary tree appears a…
573 Squirrel Simulation 🟡 Medium 1m 6s This problem models a squirrel collecting nuts in a 2D garden grid.…
574 Winning Candidate 🟡 Medium 1m 12s This problem provides two database tables, Candidate and Vote, and …
575 Distribute Candies 🟢 Easy 1m 46s This problem asks us to maximize the number of distinct candy types…
576 Out of Boundary Paths 🟡 Medium 1m 10s This problem asks us to count how many different ways a ball can le…
577 Employee Bonus 🟢 Easy 55s In this problem, we are given two database tables, Employee and Bon…
578 Get Highest Answer Rate Question 🟡 Medium 1m 16s This problem asks us to analyze user interaction data stored in the…
579 Find Cumulative Salary of an Employee 🔴 Hard 41s This problem asks us to compute a cumulative salary summary for eac…
580 Count Student Number in Departments 🟡 Medium 29s This problem asks us to determine how many students are enrolled in…
581 Shortest Unsorted Continuous Subarray 🟡 Medium 1m 9s The problem gives an integer array nums and asks for the length of …
582 Kill Process 🟡 Medium 1m 27s This problem models processes in an operating system as a tree stru…
583 Delete Operation for Two Strings 🟡 Medium 40s The problem asks us to determine the minimum number of deletion ste…
584 Find Customer Referee 🟢 Easy 40s The problem provides a Customer table with three columns: id, name,…
585 Investments in 2016 🟡 Medium 32s Here’s a full, detailed technical solution guide for LeetCode 585 f…
586 Customer Placing the Largest Number of Orders 🟢 Easy 59s The problem gives us a database table named Orders with two columns…
587 Erect the Fence 🔴 Hard 42s This problem is asking us to find the convex hull of a set of point…
588 Design In-Memory File System 🔴 Hard 44s The problem asks us to design an in-memory file system that simulat…
589 N-ary Tree Preorder Traversal 🟢 Easy 43s The problem asks for a preorder traversal of an n-ary tree. In a pr…
590 N-ary Tree Postorder Traversal 🟢 Easy 1m 14s This problem asks us to perform a postorder traversal on an n-ary t…
591 Tag Validator 🔴 Hard 1m 31s This problem asks us to validate whether a given string represents …
592 Fraction Addition and Subtraction 🟡 Medium 43s The problem requires computing the result of a mathematical express…
593 Valid Square 🟡 Medium 1m 11s The problem gives four points in a 2D coordinate system and asks wh…
594 Longest Harmonious Subsequence 🟢 Easy 38s The problem asks us to find the length of the longest harmonious su…
595 Big Countries 🟢 Easy 1m 6s This problem asks us to query a database table named World and retu…
596 Classes With at Least 5 Students 🟢 Easy 39s This problem is asking us to find classes in a school database that…
597 Friend Requests I: Overall Acceptance Rate 🟢 Easy 1m 16s This problem asks us to compute the overall acceptance rate of frie…
598 Range Addition II 🟢 Easy 34s The problem presents an m x n matrix M initialized with all zeros. …
599 Minimum Index Sum of Two Lists 🟢 Easy 33s This problem is asking us to find the common elements between two l…