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
Events
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 }}
mengli
leetcode
Repository navigation
Code
Issues
3
(3)
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
leetcode
Public
Notifications
You must be signed in to change notification settings
Fork
121
(
121
)
Star
187
(
187
)
You must be signed in to star a repository
About
leetcode
Resources
Readme
Activity
Stars
187
stars
Watchers
42
watching
Forks
121
forks
Report repository
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
120 Commits
120 Commits
Folders and files
Name
Name
Last commit message
Last commit date
.gitignore
.gitignore
3SumWithMultiplicity.java
3SumWithMultiplicity.java
AddBinary.java
AddBinary.java
AddTwoNumbers.java
AddTwoNumbers.java
Anagrams.java
Anagrams.java
BalancedBinaryTree.java
BalancedBinaryTree.java
BestTimetoBuyandSellStock.java
BestTimetoBuyandSellStock.java
BestTimetoBuyandSellStockII.java
BestTimetoBuyandSellStockII.java
BestTimetoBuyandSellStockIII.java
BestTimetoBuyandSellStockIII.java
BinaryTreeInorderTraversal.java
BinaryTreeInorderTraversal.java
BinaryTreeLevelOrderTraversalII.java
BinaryTreeLevelOrderTraversalII.java
BinaryTreeMaximumPathSum.java
BinaryTreeMaximumPathSum.java
BinaryTreePostorderTraversal.java
BinaryTreePostorderTraversal.java
BinaryTreePreorderTraversal.java
BinaryTreePreorderTraversal.java
Candy.java
Candy.java
ClimbingStairs.java
ClimbingStairs.java
CloneGraph.java
CloneGraph.java
CombinationSum.java
CombinationSum.java
CombinationSumII.java
CombinationSumII.java
Combinations.java
Combinations.java
ConstructBinaryTreefromInorderandPostorderTraversal.java
ConstructBinaryTreefromInorderandPostorderTraversal.java
ConstructBinaryTreefromPreorderAndInorderTraversal.java
ConstructBinaryTreefromPreorderAndInorderTraversal.java
ContainerWithMostWater.java
ContainerWithMostWater.java
ConvertSortedArraytoBinarySearchTree.java
ConvertSortedArraytoBinarySearchTree.java
ConvertSortedListtoBinarySearchTree.java
ConvertSortedListtoBinarySearchTree.java
CopyListwithRandomPointer.java
CopyListwithRandomPointer.java
CountandSay.java
CountandSay.java
DecodeWays.java
DecodeWays.java
DistinctSubsequences.java
DistinctSubsequences.java
DivideTwoIntegers.java
DivideTwoIntegers.java
EditDistance.java
EditDistance.java
EvaluateReversePolishNotation.java
EvaluateReversePolishNotation.java
ExpressionAddOperators.java
ExpressionAddOperators.java
FindMedianFromDataStream.java
FindMedianFromDataStream.java
FindMinimumInRotatedSortedArray.java
FindMinimumInRotatedSortedArray.java
FindPeakElement.java
FindPeakElement.java
FindTheDuplicateNumber.java
FindTheDuplicateNumber.java
FirstMissingPositive.java
FirstMissingPositive.java
FlattenBinaryTreetoLinkedList.java
FlattenBinaryTreetoLinkedList.java
FourSum.java
FourSum.java
GasStation.java
GasStation.java
GenerateParentheses.java
GenerateParentheses.java
GrayCode.java
GrayCode.java
ImplementStrStr.java
ImplementStrStr.java
InsertInterval.java
InsertInterval.java
InsertionSortList.java
InsertionSortList.java
IntegertoRoman.java
IntegertoRoman.java
InterleavingString.java
InterleavingString.java
Interval.java
Interval.java
JumpGame.java
JumpGame.java
JumpGameII.java
JumpGameII.java
KthLargestElement.java
KthLargestElement.java
LRUCache.java
LRUCache.java
LargestRectangleinHistogram.java
LargestRectangleinHistogram.java
LengthofLastWord.java
LengthofLastWord.java
LetterCombinationsofaPhoneNumber.java
LetterCombinationsofaPhoneNumber.java
LinkedListCycle.java
LinkedListCycle.java
LinkedListCycleII.java
LinkedListCycleII.java
ListNode.java
ListNode.java
LongPressedName.java
LongPressedName.java
LongestCommonPrefix.java
LongestCommonPrefix.java
LongestConsecutiveSequence.java
LongestConsecutiveSequence.java
LongestPalindromicSubstring.java
LongestPalindromicSubstring.java
LongestSubstringWithoutRepeatingCharacters.java
LongestSubstringWithoutRepeatingCharacters.java
LongestValidParentheses.java
LongestValidParentheses.java
LowestCommonAncestorOfBinaryTree.java
LowestCommonAncestorOfBinaryTree.java
LowestCommonAncestorOfaBinarySearchTree.java
LowestCommonAncestorOfaBinarySearchTree.java
MaxPointsOnALine.java
MaxPointsOnALine.java
MaximalRectangle.java
MaximalRectangle.java
MaximumDepthOfBinaryTree.java
MaximumDepthOfBinaryTree.java
MaximumSubarray.java
MaximumSubarray.java
MedianOfTwoSortedArrays.java
MedianOfTwoSortedArrays.java
MergeIntervals.java
MergeIntervals.java
MergeSortedArray.java
MergeSortedArray.java
MergeTwoSortedLists.java
MergeTwoSortedLists.java
MergekSortedLists.java
MergekSortedLists.java
MinimumAddToMakeParenthesesValid.java
MinimumAddToMakeParenthesesValid.java
MinimumDepthofBinaryTree.java
MinimumDepthofBinaryTree.java
MinimumPathSum.java
MinimumPathSum.java
MinimumWindowSubstring.java
MinimumWindowSubstring.java
Movezeros.java
Movezeros.java
MultiplyStrings.java
MultiplyStrings.java
NQueens.java
NQueens.java
NQueensII.java
NQueensII.java
NextPermutation.java
NextPermutation.java
PalindromeNumber.java
PalindromeNumber.java
PalindromePartitioning.java
PalindromePartitioning.java
PalindromePartitioningII.java
PalindromePartitioningII.java
PartitionArrayIntoDisjointIntervals.java
PartitionArrayIntoDisjointIntervals.java
PartitionList.java
PartitionList.java
PascalTriangle.java
PascalTriangle.java
PascalsTriangleII.java
PascalsTriangleII.java
PathSum.java
PathSum.java
PathSumII.java
PathSumII.java
PermutationSequence.java
PermutationSequence.java
PermutationsII.java
PermutationsII.java
PlusOne.java
PlusOne.java
Point.java
Point.java
PopulatingNextRightPointersinEachNode.java
PopulatingNextRightPointersinEachNode.java
PopulatingNextRightPointersinEachNodeII.java
PopulatingNextRightPointersinEachNodeII.java
View all files
Repository files navigation
README
More
items
leetcode
leetcode
About
leetcode
Resources
Readme
Activity
Stars
187
stars
Watchers
42
watching
Forks
121
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.