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 }}
github-interview
leetcode-2
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
leetcode-2
/
solution
/
2000-2099
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
main
Breadcrumbs
leetcode-2
/
solution
/
2000-2099
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
2000.Reverse Prefix of Word
2000.Reverse Prefix of Word
2001.Number of Pairs of Interchangeable Rectangles
2001.Number of Pairs of Interchangeable Rectangles
2002.Maximum Product of the Length of Two Palindromic Subsequences
2002.Maximum Product of the Length of Two Palindromic Subsequences
2003.Smallest Missing Genetic Value in Each Subtree
2003.Smallest Missing Genetic Value in Each Subtree
2004.The Number of Seniors and Juniors to Join the Company
2004.The Number of Seniors and Juniors to Join the Company
2005.Subtree Removal Game with Fibonacci Tree
2005.Subtree Removal Game with Fibonacci Tree
2006.Count Number of Pairs With Absolute Difference K
2006.Count Number of Pairs With Absolute Difference K
2007.Find Original Array From Doubled Array
2007.Find Original Array From Doubled Array
2008.Maximum Earnings From Taxi
2008.Maximum Earnings From Taxi
2009.Minimum Number of Operations to Make Array Continuous
2009.Minimum Number of Operations to Make Array Continuous
2010.The Number of Seniors and Juniors to Join the Company II
2010.The Number of Seniors and Juniors to Join the Company II
2011.Final Value of Variable After Performing Operations
2011.Final Value of Variable After Performing Operations
2012.Sum of Beauty in the Array
2012.Sum of Beauty in the Array
2013.Detect Squares
2013.Detect Squares
2014.Longest Subsequence Repeated k Times
2014.Longest Subsequence Repeated k Times
2015.Average Height of Buildings in Each Segment
2015.Average Height of Buildings in Each Segment
2016.Maximum Difference Between Increasing Elements
2016.Maximum Difference Between Increasing Elements
2017.Grid Game
2017.Grid Game
2018.Check if Word Can Be Placed In Crossword
2018.Check if Word Can Be Placed In Crossword
2019.The Score of Students Solving Math Expression
2019.The Score of Students Solving Math Expression
2020.Number of Accounts That Did Not Stream
2020.Number of Accounts That Did Not Stream
2021.Brightest Position on Street
2021.Brightest Position on Street
2022.Convert 1D Array Into 2D Array
2022.Convert 1D Array Into 2D Array
2023.Number of Pairs of Strings With Concatenation Equal to Target
2023.Number of Pairs of Strings With Concatenation Equal to Target
2024.Maximize the Confusion of an Exam
2024.Maximize the Confusion of an Exam
2025.Maximum Number of Ways to Partition an Array
2025.Maximum Number of Ways to Partition an Array
2026.Low-Quality Problems
2026.Low-Quality Problems
2027.Minimum Moves to Convert String
2027.Minimum Moves to Convert String
2028.Find Missing Observations
2028.Find Missing Observations
2029.Stone Game IX
2029.Stone Game IX
2030.Smallest K-Length Subsequence With Occurrences of a Letter
2030.Smallest K-Length Subsequence With Occurrences of a Letter
2031.Count Subarrays With More Ones Than Zeros
2031.Count Subarrays With More Ones Than Zeros
2032.Two Out of Three
2032.Two Out of Three
2033.Minimum Operations to Make a Uni-Value Grid
2033.Minimum Operations to Make a Uni-Value Grid
2034.Stock Price Fluctuation
2034.Stock Price Fluctuation
2035.Partition Array Into Two Arrays to Minimize Sum Difference
2035.Partition Array Into Two Arrays to Minimize Sum Difference
2036.Maximum Alternating Subarray Sum
2036.Maximum Alternating Subarray Sum
2037.Minimum Number of Moves to Seat Everyone
2037.Minimum Number of Moves to Seat Everyone
2038.Remove Colored Pieces if Both Neighbors are the Same Color
2038.Remove Colored Pieces if Both Neighbors are the Same Color
2039.The Time When the Network Becomes Idle
2039.The Time When the Network Becomes Idle
2040.Kth Smallest Product of Two Sorted Arrays
2040.Kth Smallest Product of Two Sorted Arrays
2041.Accepted Candidates From the Interviews
2041.Accepted Candidates From the Interviews
2042.Check if Numbers Are Ascending in a Sentence
2042.Check if Numbers Are Ascending in a Sentence
2043.Simple Bank System
2043.Simple Bank System
2044.Count Number of Maximum Bitwise-OR Subsets
2044.Count Number of Maximum Bitwise-OR Subsets
2045.Second Minimum Time to Reach Destination
2045.Second Minimum Time to Reach Destination
2046.Sort Linked List Already Sorted Using Absolute Values
2046.Sort Linked List Already Sorted Using Absolute Values
2047.Number of Valid Words in a Sentence
2047.Number of Valid Words in a Sentence
2048.Next Greater Numerically Balanced Number
2048.Next Greater Numerically Balanced Number
2049.Count Nodes With the Highest Score
2049.Count Nodes With the Highest Score
2050.Parallel Courses III
2050.Parallel Courses III
2051.The Category of Each Member in the Store
2051.The Category of Each Member in the Store
2052.Minimum Cost to Separate Sentence Into Rows
2052.Minimum Cost to Separate Sentence Into Rows
2053.Kth Distinct String in an Array
2053.Kth Distinct String in an Array
2054.Two Best Non-Overlapping Events
2054.Two Best Non-Overlapping Events
2055.Plates Between Candles
2055.Plates Between Candles
2056.Number of Valid Move Combinations On Chessboard
2056.Number of Valid Move Combinations On Chessboard
2057.Smallest Index With Equal Value
2057.Smallest Index With Equal Value
2058.Find the Minimum and Maximum Number of Nodes Between Critical Points
2058.Find the Minimum and Maximum Number of Nodes Between Critical Points
2059.Minimum Operations to Convert Number
2059.Minimum Operations to Convert Number
2060.Check if an Original String Exists Given Two Encoded Strings
2060.Check if an Original String Exists Given Two Encoded Strings
2061.Number of Spaces Cleaning Robot Cleaned
2061.Number of Spaces Cleaning Robot Cleaned
2062.Count Vowel Substrings of a String
2062.Count Vowel Substrings of a String
2063.Vowels of All Substrings
2063.Vowels of All Substrings
2064.Minimized Maximum of Products Distributed to Any Store
2064.Minimized Maximum of Products Distributed to Any Store
2065.Maximum Path Quality of a Graph
2065.Maximum Path Quality of a Graph
2066.Account Balance
2066.Account Balance
2067.Number of Equal Count Substrings
2067.Number of Equal Count Substrings
2068.Check Whether Two Strings are Almost Equivalent
2068.Check Whether Two Strings are Almost Equivalent
2069.Walking Robot Simulation II
2069.Walking Robot Simulation II
2070.Most Beautiful Item for Each Query
2070.Most Beautiful Item for Each Query
2071.Maximum Number of Tasks You Can Assign
2071.Maximum Number of Tasks You Can Assign
2072.The Winner University
2072.The Winner University
2073.Time Needed to Buy Tickets
2073.Time Needed to Buy Tickets
2074.Reverse Nodes in Even Length Groups
2074.Reverse Nodes in Even Length Groups
2075.Decode the Slanted Ciphertext
2075.Decode the Slanted Ciphertext
2076.Process Restricted Friend Requests
2076.Process Restricted Friend Requests
2077.Paths in Maze That Lead to Same Room
2077.Paths in Maze That Lead to Same Room
2078.Two Furthest Houses With Different Colors
2078.Two Furthest Houses With Different Colors
2079.Watering Plants
2079.Watering Plants
2080.Range Frequency Queries
2080.Range Frequency Queries
2081.Sum of k-Mirror Numbers
2081.Sum of k-Mirror Numbers
2082.The Number of Rich Customers
2082.The Number of Rich Customers
2083.Substrings That Begin and End With the Same Letter
2083.Substrings That Begin and End With the Same Letter
2084.Drop Type 1 Orders for Customers With Type 0 Orders
2084.Drop Type 1 Orders for Customers With Type 0 Orders
2085.Count Common Words With One Occurrence
2085.Count Common Words With One Occurrence
2086.Minimum Number of Buckets Required to Collect Rainwater from Houses
2086.Minimum Number of Buckets Required to Collect Rainwater from Houses
2087.Minimum Cost Homecoming of a Robot in a Grid
2087.Minimum Cost Homecoming of a Robot in a Grid
2088.Count Fertile Pyramids in a Land
2088.Count Fertile Pyramids in a Land
2089.Find Target Indices After Sorting Array
2089.Find Target Indices After Sorting Array
2090.K Radius Subarray Averages
2090.K Radius Subarray Averages
2091.Removing Minimum and Maximum From Array
2091.Removing Minimum and Maximum From Array
2092.Find All People With Secret
2092.Find All People With Secret
2093.Minimum Cost to Reach City With Discounts
2093.Minimum Cost to Reach City With Discounts
2094.Finding 3-Digit Even Numbers
2094.Finding 3-Digit Even Numbers
2095.Delete the Middle Node of a Linked List
2095.Delete the Middle Node of a Linked List
2096.Step-By-Step Directions From a Binary Tree Node to Another
2096.Step-By-Step Directions From a Binary Tree Node to Another
2097.Valid Arrangement of Pairs
2097.Valid Arrangement of Pairs
2098.Subsequence of Size K With the Largest Even Sum
2098.Subsequence of Size K With the Largest Even Sum
2099.Find Subsequence of Length K With the Largest Sum
2099.Find Subsequence of Length K With the Largest Sum
View all files
You can’t perform that action at this time.