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
Accelerator
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 }}
anaypaul
/
LeetCode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
753 Commits
753 Commits
Folders and files
Name
Name
Last commit message
Last commit date
.vscode
.vscode
30DaysLeetCodingChallenge
30DaysLeetCodingChallenge
MayLeetcodingChallenge
MayLeetcodingChallenge
__pycache__
__pycache__
01Matrix.cpp
01Matrix.cpp
1BitAnd2BitCharacters.cpp
1BitAnd2BitCharacters.cpp
3Sum.cpp
3Sum.cpp
3SumClosest.cpp
3SumClosest.cpp
3SumSmaller.cpp
3SumSmaller.cpp
4Sum2.cpp
4Sum2.cpp
AccountsMerge.cpp
AccountsMerge.cpp
AddAndSearchWordDataStructureDesign.cpp
AddAndSearchWordDataStructureDesign.cpp
AddStrings.cpp
AddStrings.cpp
AddToArrayFormOfInteger.cpp
AddToArrayFormOfInteger.cpp
AddTwoNumbers.cpp
AddTwoNumbers.cpp
AddTwoNumbers.py
AddTwoNumbers.py
AddTwoNumbers2.cpp
AddTwoNumbers2.cpp
AllElementsInTwoBinarySearchTrees.cpp
AllElementsInTwoBinarySearchTrees.cpp
AllNodesDistanceKInBinaryTree.cpp
AllNodesDistanceKInBinaryTree.cpp
AllPathsFromSourceToTarget.cpp
AllPathsFromSourceToTarget.cpp
ApplyDiscountEveryNOrders.cpp
ApplyDiscountEveryNOrders.cpp
ArrangingCoins.cpp
ArrangingCoins.cpp
ArrayNesting.cpp
ArrayNesting.cpp
ArrayPartition1.cpp
ArrayPartition1.cpp
ArrayTransformation.cpp
ArrayTransformation.cpp
AsFarFromLandAsPossible.cpp
AsFarFromLandAsPossible.cpp
AssignCookies.cpp
AssignCookies.cpp
AsteroidCollision.cpp
AsteroidCollision.cpp
AvailableCapturesForRook.cpp
AvailableCapturesForRook.cpp
AverageOfLevelsInBT.cpp
AverageOfLevelsInBT.cpp
BackspaceStringCompare.cpp
BackspaceStringCompare.cpp
BalancedBinaryTree.cpp
BalancedBinaryTree.cpp
BaseballGame.cpp
BaseballGame.cpp
BeforeAndAfterPuzzle.cpp
BeforeAndAfterPuzzle.cpp
BestSightseeingPair.cpp
BestSightseeingPair.cpp
BestTimeToBuyAndSellStock.py
BestTimeToBuyAndSellStock.py
BigCountries.txt
BigCountries.txt
BinaryGap.cpp
BinaryGap.cpp
BinaryNumbersWithAlternatingBits.cpp
BinaryNumbersWithAlternatingBits.cpp
BinaryPrefixDivisibleBy5.cpp
BinaryPrefixDivisibleBy5.cpp
BinarySearch.cpp
BinarySearch.cpp
BinarySearchToGreaterSumTree.cpp
BinarySearchToGreaterSumTree.cpp
BinaryTreeInorderTraversal.cpp
BinaryTreeInorderTraversal.cpp
BinaryTreeLevelOrderTraversal.cpp
BinaryTreeLevelOrderTraversal.cpp
BinaryTreeLongestConsecutiveSequence.cpp
BinaryTreeLongestConsecutiveSequence.cpp
BinaryTreeLongestConsecutiveSequence2.cpp
BinaryTreeLongestConsecutiveSequence2.cpp
BinaryTreeLongestConsequtiveSequence.cpp
BinaryTreeLongestConsequtiveSequence.cpp
BinaryTreeMaximumPathSum.cpp
BinaryTreeMaximumPathSum.cpp
BinaryTreePaths.cpp
BinaryTreePaths.cpp
BinaryTreeRightSideView.cpp
BinaryTreeRightSideView.cpp
BinaryTreeTilt.cpp
BinaryTreeTilt.cpp
BinaryTreeUpsideDown.cpp
BinaryTreeUpsideDown.cpp
BinaryTreeVerticalOrderTraversal.cpp
BinaryTreeVerticalOrderTraversal.cpp
BinaryTreeZigZagTreeTraversal.cpp
BinaryTreeZigZagTreeTraversal.cpp
BinaryWatch.cpp
BinaryWatch.cpp
BoundaryOfBinaryTree.cpp
BoundaryOfBinaryTree.cpp
BreakAPalindrome.cpp
BreakAPalindrome.cpp
BrickWall.cpp
BrickWall.cpp
BullsAndCows.cpp
BullsAndCows.cpp
BuySellStockMaxProfit.py
BuySellStockMaxProfit.py
CamelCaseMatching.cpp
CamelCaseMatching.cpp
CampusBikes.cpp
CampusBikes.cpp
CanPlaceFlowers.cpp
CanPlaceFlowers.cpp
CapacityToShipPackagesWithinDDays.cpp
CapacityToShipPackagesWithinDDays.cpp
CellsWithOddValuesInAMatrix.cpp
CellsWithOddValuesInAMatrix.cpp
CheckCompletenessOfBinaryTree.cpp
CheckCompletenessOfBinaryTree.cpp
CheckIfANumberIsAMajorityElementInASortedArray.cpp
CheckIfANumberIsAMajorityElementInASortedArray.cpp
CheckIfItsAStraightLine.cpp
CheckIfItsAStraightLine.cpp
CheckIfNandItsDoubleExist.cpp
CheckIfNandItsDoubleExist.cpp
CherryPickup.cpp
CherryPickup.cpp
CloneGraph.cpp
CloneGraph.cpp
ClosestBinarySearchTreeValue.cpp
ClosestBinarySearchTreeValue.cpp
ClosestLeafInABinaryTree.cpp
ClosestLeafInABinaryTree.cpp
CoinChange.cpp
CoinChange.cpp
CombinationSum.cpp
CombinationSum.cpp
CompareStringsByFreqOfSmallestChar.cpp
CompareStringsByFreqOfSmallestChar.cpp
ComplementofBase10Integer.cpp
ComplementofBase10Integer.cpp
ConcatenatedWords.cpp
ConcatenatedWords.cpp
ConfusingNumber.cpp
ConfusingNumber.cpp
ConnectingCitiesWithMinimumCost.cpp
ConnectingCitiesWithMinimumCost.cpp
ConstructBinarySearchTreefromPreorderTraversal.cpp
ConstructBinarySearchTreefromPreorderTraversal.cpp
ConstructBinaryTreeFromInorderAndPostorderTraversal.cpp
ConstructBinaryTreeFromInorderAndPostorderTraversal.cpp
ConstructBinaryTreefromPreorderandInorderTraversal.cpp
ConstructBinaryTreefromPreorderandInorderTraversal.cpp
ConstructStringFromBinaryTree.cpp
ConstructStringFromBinaryTree.cpp
ContainerWithMostWater.cpp
ContainerWithMostWater.cpp
ContainsDuplicate.py
ContainsDuplicate.py
ContainsDuplicate2.cpp
ContainsDuplicate2.cpp
ContiguousSubarraySum.cpp
ContiguousSubarraySum.cpp
ConvertBSTtoGreaterTree.cpp
ConvertBSTtoGreaterTree.cpp
ConvertBinaryNumberInLinkedListToInteger.cpp
ConvertBinaryNumberInLinkedListToInteger.cpp
ConvertBinarySearchTreeToSortedDoublyLinkedList.cpp
ConvertBinarySearchTreeToSortedDoublyLinkedList.cpp
ConvertIntegerToTheSumOfTwoNoZeroIntegers.cpp
ConvertIntegerToTheSumOfTwoNoZeroIntegers.cpp
CopyListWithRandomPointer.cpp
CopyListWithRandomPointer.cpp
CountAndSay.cpp
CountAndSay.cpp
CountAndSay.py
CountAndSay.py
CountServersThatCommunicate.cpp
CountServersThatCommunicate.cpp
CountSquareSubmatricesWithAllOnes.cpp
CountSquareSubmatricesWithAllOnes.cpp
CountSubstringsWithOnlyOneDistinctLetter.cpp
CountSubstringsWithOnlyOneDistinctLetter.cpp
CountingBits.cpp
CountingBits.cpp
CourseSchedule.cpp
CourseSchedule.cpp
View all files
Repository files navigation
README
More
items
LeetCode
My Leetcode solution
About
Leetcode solution
Topics
advanced-data-structures
cplusplus
cpp
cpp-library
disjoint-sets
disjoint-unions
graph
graph-algorithms
kmp
leetcode
problem-solving
python3
segment-tree
stl-algorithms
stl-containers
stl-vector
trie
trie-data-structure
Resources
Readme
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.