Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
hellodengfei
leetcode-java
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
leetcode-java
/
solution
/
1900-1999
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
main
Breadcrumbs
leetcode-java
/
solution
/
1900-1999
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
1900.The Earliest and Latest Rounds Where Players Compete
1900.The Earliest and Latest Rounds Where Players Compete
1901.Find a Peak Element II
1901.Find a Peak Element II
1902.Depth of BST Given Insertion Order
1902.Depth of BST Given Insertion Order
1903.Largest Odd Number in String
1903.Largest Odd Number in String
1904.The Number of Full Rounds You Have Played
1904.The Number of Full Rounds You Have Played
1905.Count Sub Islands
1905.Count Sub Islands
1906.Minimum Absolute Difference Queries
1906.Minimum Absolute Difference Queries
1907.Count Salary Categories
1907.Count Salary Categories
1908.Game of Nim
1908.Game of Nim
1909.Remove One Element to Make the Array Strictly Increasing
1909.Remove One Element to Make the Array Strictly Increasing
1910.Remove All Occurrences of a Substring
1910.Remove All Occurrences of a Substring
1911.Maximum Alternating Subsequence Sum
1911.Maximum Alternating Subsequence Sum
1912.Design Movie Rental System
1912.Design Movie Rental System
1913.Maximum Product Difference Between Two Pairs
1913.Maximum Product Difference Between Two Pairs
1914.Cyclically Rotating a Grid
1914.Cyclically Rotating a Grid
1915.Number of Wonderful Substrings
1915.Number of Wonderful Substrings
1916.Count Ways to Build Rooms in an Ant Colony
1916.Count Ways to Build Rooms in an Ant Colony
1917.Leetcodify Friends Recommendations
1917.Leetcodify Friends Recommendations
1918.Kth Smallest Subarray Sum
1918.Kth Smallest Subarray Sum
1919.Leetcodify Similar Friends
1919.Leetcodify Similar Friends
1920.Build Array from Permutation
1920.Build Array from Permutation
1921.Eliminate Maximum Number of Monsters
1921.Eliminate Maximum Number of Monsters
1922.Count Good Numbers
1922.Count Good Numbers
1923.Longest Common Subpath
1923.Longest Common Subpath
1924.Erect the Fence II
1924.Erect the Fence II
1925.Count Square Sum Triples
1925.Count Square Sum Triples
1926.Nearest Exit from Entrance in Maze
1926.Nearest Exit from Entrance in Maze
1927.Sum Game
1927.Sum Game
1928.Minimum Cost to Reach Destination in Time
1928.Minimum Cost to Reach Destination in Time
1929.Concatenation of Array
1929.Concatenation of Array
1930.Unique Length-3 Palindromic Subsequences
1930.Unique Length-3 Palindromic Subsequences
1931.Painting a Grid With Three Different Colors
1931.Painting a Grid With Three Different Colors
1932.Merge BSTs to Create Single BST
1932.Merge BSTs to Create Single BST
1933.Check if String Is Decomposable Into Value-Equal Substrings
1933.Check if String Is Decomposable Into Value-Equal Substrings
1934.Confirmation Rate
1934.Confirmation Rate
1935.Maximum Number of Words You Can Type
1935.Maximum Number of Words You Can Type
1936.Add Minimum Number of Rungs
1936.Add Minimum Number of Rungs
1937.Maximum Number of Points with Cost
1937.Maximum Number of Points with Cost
1938.Maximum Genetic Difference Query
1938.Maximum Genetic Difference Query
1939.Users That Actively Request Confirmation Messages
1939.Users That Actively Request Confirmation Messages
1940.Longest Common Subsequence Between Sorted Arrays
1940.Longest Common Subsequence Between Sorted Arrays
1941.Check if All Characters Have Equal Number of Occurrences
1941.Check if All Characters Have Equal Number of Occurrences
1942.The Number of the Smallest Unoccupied Chair
1942.The Number of the Smallest Unoccupied Chair
1943.Describe the Painting
1943.Describe the Painting
1944.Number of Visible People in a Queue
1944.Number of Visible People in a Queue
1945.Sum of Digits of String After Convert
1945.Sum of Digits of String After Convert
1946.Largest Number After Mutating Substring
1946.Largest Number After Mutating Substring
1947.Maximum Compatibility Score Sum
1947.Maximum Compatibility Score Sum
1948.Delete Duplicate Folders in System
1948.Delete Duplicate Folders in System
1949.Strong Friendship
1949.Strong Friendship
1950.Maximum of Minimum Values in All Subarrays
1950.Maximum of Minimum Values in All Subarrays
1951.All the Pairs With the Maximum Number of Common Followers
1951.All the Pairs With the Maximum Number of Common Followers
1952.Three Divisors
1952.Three Divisors
1953.Maximum Number of Weeks for Which You Can Work
1953.Maximum Number of Weeks for Which You Can Work
1954.Minimum Garden Perimeter to Collect Enough Apples
1954.Minimum Garden Perimeter to Collect Enough Apples
1955.Count Number of Special Subsequences
1955.Count Number of Special Subsequences
1956.Minimum Time For K Virus Variants to Spread
1956.Minimum Time For K Virus Variants to Spread
1957.Delete Characters to Make Fancy String
1957.Delete Characters to Make Fancy String
1958.Check if Move is Legal
1958.Check if Move is Legal
1959.Minimum Total Space Wasted With K Resizing Operations
1959.Minimum Total Space Wasted With K Resizing Operations
1960.Maximum Product of the Length of Two Palindromic Substrings
1960.Maximum Product of the Length of Two Palindromic Substrings
1961.Check If String Is a Prefix of Array
1961.Check If String Is a Prefix of Array
1962.Remove Stones to Minimize the Total
1962.Remove Stones to Minimize the Total
1963.Minimum Number of Swaps to Make the String Balanced
1963.Minimum Number of Swaps to Make the String Balanced
1964.Find the Longest Valid Obstacle Course at Each Position
1964.Find the Longest Valid Obstacle Course at Each Position
1965.Employees With Missing Information
1965.Employees With Missing Information
1966.Binary Searchable Numbers in an Unsorted Array
1966.Binary Searchable Numbers in an Unsorted Array
1967.Number of Strings That Appear as Substrings in Word
1967.Number of Strings That Appear as Substrings in Word
1968.Array With Elements Not Equal to Average of Neighbors
1968.Array With Elements Not Equal to Average of Neighbors
1969.Minimum Non-Zero Product of the Array Elements
1969.Minimum Non-Zero Product of the Array Elements
1970.Last Day Where You Can Still Cross
1970.Last Day Where You Can Still Cross
1971.Find if Path Exists in Graph
1971.Find if Path Exists in Graph
1972.First and Last Call On the Same Day
1972.First and Last Call On the Same Day
1973.Count Nodes Equal to Sum of Descendants
1973.Count Nodes Equal to Sum of Descendants
1974.Minimum Time to Type Word Using Special Typewriter
1974.Minimum Time to Type Word Using Special Typewriter
1975.Maximum Matrix Sum
1975.Maximum Matrix Sum
1976.Number of Ways to Arrive at Destination
1976.Number of Ways to Arrive at Destination
1977.Number of Ways to Separate Numbers
1977.Number of Ways to Separate Numbers
1978.Employees Whose Manager Left the Company
1978.Employees Whose Manager Left the Company
1979.Find Greatest Common Divisor of Array
1979.Find Greatest Common Divisor of Array
1980.Find Unique Binary String
1980.Find Unique Binary String
1981.Minimize the Difference Between Target and Chosen Elements
1981.Minimize the Difference Between Target and Chosen Elements
1982.Find Array Given Subset Sums
1982.Find Array Given Subset Sums
1983.Widest Pair of Indices With Equal Range Sum
1983.Widest Pair of Indices With Equal Range Sum
1984.Minimum Difference Between Highest and Lowest of K Scores
1984.Minimum Difference Between Highest and Lowest of K Scores
1985.Find the Kth Largest Integer in the Array
1985.Find the Kth Largest Integer in the Array
1986.Minimum Number of Work Sessions to Finish the Tasks
1986.Minimum Number of Work Sessions to Finish the Tasks
1987.Number of Unique Good Subsequences
1987.Number of Unique Good Subsequences
1988.Find Cutoff Score for Each School
1988.Find Cutoff Score for Each School
1989.Maximum Number of People That Can Be Caught in Tag
1989.Maximum Number of People That Can Be Caught in Tag
1990.Count the Number of Experiments
1990.Count the Number of Experiments
1991.Find the Middle Index in Array
1991.Find the Middle Index in Array
1992.Find All Groups of Farmland
1992.Find All Groups of Farmland
1993.Operations on Tree
1993.Operations on Tree
1994.The Number of Good Subsets
1994.The Number of Good Subsets
1995.Count Special Quadruplets
1995.Count Special Quadruplets
1996.The Number of Weak Characters in the Game
1996.The Number of Weak Characters in the Game
1997.First Day Where You Have Been in All the Rooms
1997.First Day Where You Have Been in All the Rooms
1998.GCD Sort of an Array
1998.GCD Sort of an Array
1999.Smallest Greater Multiple Made of Two Digits
1999.Smallest Greater Multiple Made of Two Digits
View all files
You can’t perform that action at this time.