LeetCode 19xx
LeetCode problems 1900–1999
LeetCode 19xx
| # | Problem | Difficulty | Time | Notes |
|---|---|---|---|---|
| 1900 | The Earliest and Latest Rounds Where Players Compete | 🔴 Hard | 1m 40s | The tournament is organized as a sequence of elimination rounds. In… |
| 1901 | Find a Peak Element II | 🟡 Medium | 43s | The problem requires finding a peak element in a 2D matrix. A peak … |
| 1902 | Depth of BST Given Insertion Order | 🟡 Medium | 1m 24s | The problem gives us an array order that represents the exact seque… |
| 1903 | Largest Odd Number in String | 🟢 Easy | 50s | The problem asks us to find the largest-valued odd integer substrin… |
| 1904 | The Number of Full Rounds You Have Played | 🟡 Medium | 1m 25s | The problem describes an online chess tournament where a new round … |
| 1905 | Count Sub Islands | 🟡 Medium | 52s | The problem presents two m x n binary matrices, grid1 and grid2, re… |
| 1906 | Minimum Absolute Difference Queries | 🟡 Medium | 1m 7s | The problem asks us to compute the minimum absolute difference in s… |
| 1907 | Count Salary Categories | 🟡 Medium | 1m 30s | This problem asks us to classify bank accounts into three salary ca… |
| 1908 | Game of Nim | 🟡 Medium | 1m 7s | This problem is the classic mathematical game known as Nim. We are … |
| 1909 | Remove One Element to Make the Array Strictly Increasing | 🟢 Easy | 1m 32s | The problem gives us a 0-indexed integer array nums and asks whethe… |
| 1910 | Remove All Occurrences of a Substring | 🟡 Medium | 1m 13s | The problem asks us to repeatedly remove occurrences of a substring… |
| 1911 | Maximum Alternating Subsequence Sum | 🟡 Medium | 1m 35s | The problem asks us to compute the maximum possible alternating sum… |
| 1912 | Design Movie Rental System | 🔴 Hard | 58s | The problem requires designing a movie rental system for multiple s… |
| 1913 | Maximum Product Difference Between Two Pairs | 🟢 Easy | 42s | This problem asks us to find the maximum product difference between… |
| 1913 | Maximum Product Difference Between Two Pairs | 🟢 Easy | 1m 12s | The problem asks us to select four distinct elements from an intege… |
| 1914 | Cyclically Rotating a Grid | 🟡 Medium | 1m 39s | The problem gives us an m x n matrix called grid, along with an int… |
| 1915 | Number of Wonderful Substrings | 🟡 Medium | 1m 36s | The problem asks us to count how many non-empty substrings of a giv… |
| 1916 | Count Ways to Build Rooms in an Ant Colony | 🔴 Hard | 47s | The problem asks us to count the number of valid ways to sequential… |
| 1917 | Leetcodify Friends Recommendations | 🔴 Hard | 49s | This problem requires generating friend recommendations for users o… |
| 1918 | Kth Smallest Subarray Sum | 🟡 Medium | 46s | The problem asks us to find the kth smallest sum among all possible… |
| 1919 | Leetcodify Similar Friends | 🔴 Hard | 47s | This problem involves analyzing two database tables, Listens and Fr… |
| 1920 | Build Array from Permutation | 🟢 Easy | 1m 7s | The problem gives us a zero-based permutation array called nums. A … |
| 1921 | Eliminate Maximum Number of Monsters | 🟡 Medium | 1m 31s | This problem asks us to determine how many monsters we can eliminat… |
| 1922 | Count Good Numbers | 🟡 Medium | 1m 21s | The problem asks us to count how many digit strings of length n sat… |
| 1923 | Longest Common Subpath | 🔴 Hard | 1m 32s | The problem asks us to find the maximum length of a contiguous sequ… |
| 1924 | Erect the Fence II | 🔴 Hard | 51s | Here is a fully detailed technical solution guide for LeetCode 1924… |
| 1925 | Count Square Sum Triples | 🟢 Easy | 55s | This problem asks us to count all ordered triples (a, b, c) such th… |
| 1926 | Nearest Exit from Entrance in Maze | 🟡 Medium | 1m 26s | The problem gives us a rectangular maze represented by a 2D grid. E… |
| 1927 | Sum Game | 🟡 Medium | 1m 14s | The problem describes a two player game played on a numeric string … |
| 1928 | Minimum Cost to Reach Destination in Time | 🔴 Hard | 38s | The problem asks us to find the minimum cost to travel from city 0 … |
| 1929 | Concatenation of Array | 🟢 Easy | 33s | This problem asks us to take an input array nums of length n and pr… |
| 1930 | Unique Length-3 Palindromic Subsequences | 🟡 Medium | 52s | The problem asks us to count unique palindromic subsequences of len… |
| 1931 | Painting a Grid With Three Different Colors | 🔴 Hard | 51s | The problem is asking us to count the number of ways to paint an m … |
| 1932 | Merge BSTs to Create Single BST | 🔴 Hard | 38s | This problem asks us to take multiple very small binary search tree… |
| 1933 | Check if String Is Decomposable Into Value-Equal Substrings | 🟢 Easy | 52s | The problem asks us to determine if a given string s, consisting so… |
| 1934 | Confirmation Rate | 🟡 Medium | 57s | This problem asks us to calculate the confirmation rate for each us… |
| 1935 | Maximum Number of Words You Can Type | 🟢 Easy | 31s | The problem is asking us to determine how many words in a given str… |
| 1936 | Add Minimum Number of Rungs | 🟡 Medium | 1m | The problem gives us a ladder represented by a strictly increasing … |
| 1937 | Maximum Number of Points with Cost | 🟡 Medium | 1m 23s | The problem gives us an m x n matrix called points. We must choose … |
| 1938 | Maximum Genetic Difference Query | 🔴 Hard | 44s | The problem presents a rooted tree where each node is uniquely iden… |
| 1939 | Users That Actively Request Confirmation Messages | 🟢 Easy | 5m 1s | This problem asks us to identify users who requested confirmation m… |
| 1940 | Longest Common Subsequence Between Sorted Arrays | 🟡 Medium | 43s | The problem asks us to find the longest common subsequence (LCS) am… |
| 1941 | Check if All Characters Have Equal Number of Occurrences | 🟢 Easy | 53s | The problem asks us to determine whether a given string s is good, … |
| 1942 | The Number of the Smallest Unoccupied Chair | 🟡 Medium | 40s | This problem describes a scenario where a group of friends attends … |
| 1943 | Describe the Painting | 🟡 Medium | 1m 19s | The problem describes a painting laid out on a number line. Each se… |
| 1944 | Number of Visible People in a Queue | 🔴 Hard | 33s | The problem gives a queue of n people standing from left to right, … |
| 1945 | Sum of Digits of String After Convert | 🟢 Easy | 29s | This problem asks us to take a string of lowercase English letters … |
| 1946 | Largest Number After Mutating Substring | 🟡 Medium | 38s | This problem asks us to construct the lexicographically largest pos… |
| 1947 | Maximum Compatibility Score Sum | 🟡 Medium | 49s | The problem is asking us to optimally pair students with mentors su… |
| 1948 | Delete Duplicate Folders in System | 🔴 Hard | 37s | The problem gives a hierarchical file system represented as a list … |
| 1949 | Strong Friendship | 🟡 Medium | 1m 25s | The problem gives us a table named Friendship, where every row repr… |
| 1950 | Maximum of Minimum Values in All Subarrays | 🟡 Medium | 1m 23s | This problem asks us to compute, for every possible subarray size, … |
| 1951 | All the Pairs With the Maximum Number of Common Followers | 🟡 Medium | 52s | The problem provides a relational table named Relations, where each… |
| 1952 | Three Divisors | 🟢 Easy | 35s | The problem asks us to determine whether a given integer n has exac… |
| 1953 | Maximum Number of Weeks for Which You Can Work | 🟡 Medium | 1m 16s | The problem gives us an array called milestones, where each value r… |
| 1954 | Minimum Garden Perimeter to Collect Enough Apples | 🟡 Medium | 1m 13s | The problem describes an infinite two dimensional grid where every … |
| 1955 | Count Number of Special Subsequences | 🔴 Hard | 59s | This problem asks us to count the number of special subsequences in… |
| 1956 | Minimum Time For K Virus Variants to Spread | 🔴 Hard | 1m 39s | The problem describes multiple virus variants spreading across an i… |
| 1957 | Delete Characters to Make Fancy String | 🟢 Easy | 1m 14s | The problem asks us to transform a given string into a "fancy strin… |
| 1958 | Check if Move is Legal | 🟡 Medium | 55s | This problem asks us to determine whether a move in a board game is… |
| 1959 | Minimum Total Space Wasted With K Resizing Operations | 🟡 Medium | 35s | Let's go through a full, detailed technical solution guide for Leet… |
| 1960 | Maximum Product of the Length of Two Palindromic Substrings | 🔴 Hard | 1m 40s | The problem asks us to find two non-overlapping odd-length palindro… |
| 1961 | Check If String Is a Prefix of Array | 🟢 Easy | 4m 3s | The problem is asking us to determine whether a given string s can … |
| 1962 | Remove Stones to Minimize the Total | 🟡 Medium | 2m 4s | The problem gives us an array called piles, where each element repr… |
| 1963 | Minimum Number of Swaps to Make the String Balanced | 🟡 Medium | 42s | The problem asks us to transform a given string of brackets into a … |
| 1960 | Maximum Product of the Length of Two Palindromic Substrings | 🔴 Hard | 1m 14s | The problem asks us to find two non-overlapping palindromic substri… |
| 1961 | Check If String Is a Prefix of Array | 🟢 Easy | 4m 3s | The problem is asking us to determine whether a given string s can … |
| 1962 | Remove Stones to Minimize the Total | 🟡 Medium | 2m 4s | The problem gives us an array called piles, where each element repr… |
| 1963 | Minimum Number of Swaps to Make the String Balanced | 🟡 Medium | 1m 39s | The problem gives us a string consisting only of opening brackets '… |
| 1964 | Find the Longest Valid Obstacle Course at Each Position | 🔴 Hard | 1m 13s | The problem gives an array obstacles, where each value represents t… |
| 1965 | Employees With Missing Information | 🟢 Easy | 35s | The problem provides two relational tables, one named Employees and… |
| 1966 | Binary Searchable Numbers in an Unsorted Array | 🟡 Medium | 1m 19s | This problem asks us to identify how many numbers in an unsorted ar… |
| 1967 | Number of Strings That Appear as Substrings in Word | 🟢 Easy | 30s | The problem asks us to determine how many strings in the array patt… |
| 1968 | Array With Elements Not Equal to Average of Neighbors | 🟡 Medium | 36s | The problem asks us to rearrange a distinct integer array so that n… |
| 1969 | Minimum Non-Zero Product of the Array Elements | 🟡 Medium | 1m 8s | The problem gives us an integer p and defines an array containing e… |
| 1970 | Last Day Where You Can Still Cross | 🔴 Hard | 50s | This problem asks us to find the last day we can cross a grid from … |
| 1971 | Find if Path Exists in Graph | 🟢 Easy | 49s | The problem asks us to determine whether a path exists between two … |
| 1972 | First and Last Call On the Same Day | 🔴 Hard | 40s | The problem provides a table of phone call records where each row c… |
| 1973 | Count Nodes Equal to Sum of Descendants | 🟡 Medium | 44s | This problem asks us to analyze a binary tree and count how many no… |
| 1974 | Minimum Time to Type Word Using Special Typewriter | 🟢 Easy | 1m 12s | The problem describes a circular typewriter containing all lowercas… |
| 1975 | Maximum Matrix Sum | 🟡 Medium | 46s | The problem gives an n x n integer matrix and allows an operation w… |
| 1976 | Number of Ways to Arrive at Destination | 🟡 Medium | 1m 41s | This problem gives us a weighted, undirected graph. Each intersecti… |
| 1977 | Number of Ways to Separate Numbers | 🔴 Hard | 44s | The problem asks us to determine the number of ways a string of dig… |
| 1978 | Employees Whose Manager Left the Company | 🟢 Easy | 38s | The problem is asking us to find employees in a company who meet tw… |
| 1979 | Find Greatest Common Divisor of Array | 🟢 Easy | 29s | The problem asks us to compute the greatest common divisor (GCD) of… |
| 1980 | Find Unique Binary String | 🟡 Medium | 41s | The problem is asking us to find a binary string of length n that d… |
| 1981 | Minimize the Difference Between Target and Chosen Elements | 🟡 Medium | 54s | This problem asks us to select exactly one element from each row of… |
| 1982 | Find Array Given Subset Sums | 🔴 Hard | 35s | The problem gives us an integer n and an array sums of length 2^n, … |
| 1983 | Widest Pair of Indices With Equal Range Sum | 🟡 Medium | 52s | The problem asks us to find the widest subarray (continuous segment… |
| 1984 | Minimum Difference Between Highest and Lowest of K Scores | 🟢 Easy | 53s | The problem asks us to find the minimum possible difference between… |
| 1985 | Find the Kth Largest Integer in the Array | 🟡 Medium | 43s | This problem asks us to find the kth largest value among a list of … |
| 1986 | Minimum Number of Work Sessions to Finish the Tasks | 🟡 Medium | 1m 55s | This problem asks us to schedule a collection of tasks into the min… |
| 1987 | Number of Unique Good Subsequences | 🔴 Hard | 44s | The problem asks us to count how many distinct subsequences of a bi… |
| 1988 | Find Cutoff Score for Each School | 🟡 Medium | 40s | This problem asks us to compute a minimum score requirement (cutoff… |
| 1989 | Maximum Number of People That Can Be Caught in Tag | 🟡 Medium | 37s | The problem describes a line of people represented by a binary arra… |
| 1990 | Count the Number of Experiments | 🟡 Medium | 1m 9s | This problem gives us a database table named Experiments. Each row … |
| 1991 | Find the Middle Index in Array | 🟢 Easy | 1m 32s | The problem gives us a 0-indexed integer array called nums. We need… |
| 1992 | Find All Groups of Farmland | 🟡 Medium | 1m 26s | In this problem, we are given a binary matrix called land. Each cel… |
| 1992 | Find All Groups of Farmland | 🟡 Medium | 1m 28s | The problem gives a binary matrix representing a piece of land, whe… |
| 1993 | Operations on Tree | 🟡 Medium | 1m 32s | The problem asks us to design a mutable tree-based data structure t… |
| 1994 | The Number of Good Subsets | 🔴 Hard | 1m 32s | This problem asks us to count how many subsets of the input array h… |
| 1995 | Count Special Quadruplets | 🟢 Easy | 42s | The problem asks us to count the number of distinct quadruplets (a,… |
| 1996 | The Number of Weak Characters in the Game | 🟡 Medium | 1m 7s | In this problem, every character in the game has two attributes: - … |
| 1997 | First Day Where You Have Been in All the Rooms | 🟡 Medium | 44s | The problem describes a scenario where you visit a sequence of n ro… |
| 1998 | GCD Sort of an Array | 🔴 Hard | 58s | The problem asks whether it is possible to sort an integer array nu… |
| 1999 | Smallest Greater Multiple Made of Two Digits | 🟡 Medium | 59s | The problem asks us to find the smallest integer that satisfies thr… |