Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
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 }}
plh97
leetcode
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
leetcode
/
algorithm
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
leetcode
/
algorithm
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
1.TwoSum
1.TwoSum
10.RegularExpressionMatching
10.RegularExpressionMatching
100.SameTree
100.SameTree
1002.FindCommonCharacters
1002.FindCommonCharacters
1005.MaximizeSumOfArrayAfterKNegations
1005.MaximizeSumOfArrayAfterKNegations
1008.ConstructBinarySearchTreefromPreorderTraversal
1008.ConstructBinarySearchTreefromPreorderTraversal
1009.ComplementofBase10Integer
1009.ComplementofBase10Integer
101.SymmetricTree
101.SymmetricTree
1010.PairsofSongsWithTotalDurationsDivisibleby60
1010.PairsofSongsWithTotalDurationsDivisibleby60
1013.PartitionArrayIntoThreePartsWithEqualSum
1013.PartitionArrayIntoThreePartsWithEqualSum
1016.BinaryStringWithSubstringsRepresenting1ToN
1016.BinaryStringWithSubstringsRepresenting1ToN
1020.NumberofEnclaves
1020.NumberofEnclaves
1021.RemoveOutermostParentheses
1021.RemoveOutermostParentheses
1022.SumofRootToLeafBinaryNumbers
1022.SumofRootToLeafBinaryNumbers
1028.RecoveraTreeFromPreorderTraversal
1028.RecoveraTreeFromPreorderTraversal
1029.TwoCityScheduling
1029.TwoCityScheduling
1037.ValidBoomerang
1037.ValidBoomerang
1038.BinarySearchTreetoGreaterSumTree
1038.BinarySearchTreetoGreaterSumTree
104.MaximumDepthofBinaryTree
104.MaximumDepthofBinaryTree
1041.RobotBoundedInCircle
1041.RobotBoundedInCircle
1046.LastStoneWeight
1046.LastStoneWeight
1047.RemoveAllAdjacentDuplicatesInString
1047.RemoveAllAdjacentDuplicatesInString
1051.HeightChecker
1051.HeightChecker
107.BinaryTreeLevelOrderTraversal2
107.BinaryTreeLevelOrderTraversal2
1079.LetterTilePossibilities
1079.LetterTilePossibilities
108.ConvertSortedArraytoBinarySearchTree
108.ConvertSortedArraytoBinarySearchTree
1089.DuplicateZeros
1089.DuplicateZeros
1094.CarPooling
1094.CarPooling
11.ContainerWithMostWater
11.ContainerWithMostWater
110.BalancedBinaryTree
110.BalancedBinaryTree
111.MinimumDepthofBinaryTree
111.MinimumDepthofBinaryTree
1110.DeleteNodesAndReturnForest
1110.DeleteNodesAndReturnForest
112.PathSum
112.PathSum
1122.RelativeSortArray
1122.RelativeSortArray
118.PascalTriangle
118.PascalTriangle
119.PascalTriangle2
119.PascalTriangle2
12.IntegerToRoman
12.IntegerToRoman
120.Triangle
120.Triangle
121.BestTimetoBuyandSellStock
121.BestTimetoBuyandSellStock
1228.MissingNumberInArithmeticProgression
1228.MissingNumberInArithmeticProgression
1232.CheckIfItIsaStraightLine
1232.CheckIfItIsaStraightLine
129.SumRoottoLeafNumbers
129.SumRoottoLeafNumbers
13.RomanToInteger
13.RomanToInteger
136.SingleNumber
136.SingleNumber
137.SingleNumber2
137.SingleNumber2
14.LongestCommonPrefix
14.LongestCommonPrefix
141.LinkedListCycle
141.LinkedListCycle
144.BinaryTreePreorderTraversal
144.BinaryTreePreorderTraversal
146.LRUCache
146.LRUCache
15.3Sum
15.3Sum
16.3SumClose
16.3SumClose
160.IntersectionofTwoLinkedLists
160.IntersectionofTwoLinkedLists
167.TwoSum2-Inputarrayissorted
167.TwoSum2-Inputarrayissorted
168.ExcelSheetColumnTitle
168.ExcelSheetColumnTitle
169.MajorityElement
169.MajorityElement
17.LetterCombinationsofaPhoneNumber
17.LetterCombinationsofaPhoneNumber
171.ExcelSheetColumnNumber
171.ExcelSheetColumnNumber
172.FactorialTrailingZeroes
172.FactorialTrailingZeroes
18.4Sum
18.4Sum
189.RotateArray
189.RotateArray
19.RemoveNthNodeFromEndOfList
19.RemoveNthNodeFromEndOfList
191.Numberof1Bits
191.Numberof1Bits
198.HouseRobber
198.HouseRobber
2.AddTwoNumber
2.AddTwoNumber
20.ValidParentheses
20.ValidParentheses
202.HappyNumber
202.HappyNumber
204.CountPrimes
204.CountPrimes
206.ReverseLinkedList
206.ReverseLinkedList
21.MergeTwoLists
21.MergeTwoLists
217.ContainsDuplicate
217.ContainsDuplicate
219.ContainsDuplicateII
219.ContainsDuplicateII
22.GenerateParentheses
22.GenerateParentheses
226.InvertBinaryTree
226.InvertBinaryTree
23.MergekSortedLists
23.MergekSortedLists
230.KthSmallestElementinaBST
230.KthSmallestElementinaBST
231.PowerofTwo
231.PowerofTwo
235.LowestCommonAncestorofaBinarySearchTree
235.LowestCommonAncestorofaBinarySearchTree
239.SlidingWindowMaximum
239.SlidingWindowMaximum
24.SwapNodesInPairs
24.SwapNodesInPairs
242.ValidAnagram
242.ValidAnagram
25.ReverseNodesInK-Group
25.ReverseNodesInK-Group
258.AddDigits
258.AddDigits
26.RemoveDuplicatesfromSortedArray
26.RemoveDuplicatesfromSortedArray
260.SingleNumberIII
260.SingleNumberIII
263.UglyNumber
263.UglyNumber
268.MissingNumber
268.MissingNumber
27.RemoveElement
27.RemoveElement
28.ImplementStrStr
28.ImplementStrStr
283.MoveZeroes
283.MoveZeroes
3.LongestSubstringWithoutRepeatingCharacters
3.LongestSubstringWithoutRepeatingCharacters
30.SubstringWithConcatenationOfAllWords
30.SubstringWithConcatenationOfAllWords
31.NextPermutation
31.NextPermutation
326.PowerofThree
326.PowerofThree
337.HouseRobberIII
337.HouseRobberIII
338.CountingBits
338.CountingBits
34.FindFirstandLastPositionofElementinSortedArray
34.FindFirstandLastPositionofElementinSortedArray
342.PowerofFour
342.PowerofFour
344.ReverseString
344.ReverseString
345.ReverseVowelsOfAString
345.ReverseVowelsOfAString
347.TopKFrequentElements
347.TopKFrequentElements
View all files
You can’t perform that action at this time.