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 }}
JavaCodeHelp
AlgoDS
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
AlgoDS
/
src
/
problems
/
easy
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
AlgoDS
/
src
/
problems
/
easy
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
AddBinary.java
AddBinary.java
AddDigits.java
AddDigits.java
AddStrings.java
AddStrings.java
AlternatingBits.java
AlternatingBits.java
ArrangingCoins.java
ArrangingCoins.java
AssignCookies.java
AssignCookies.java
AverageofLevelsinBinaryTree.java
AverageofLevelsinBinaryTree.java
BalancedBinaryTree.java
BalancedBinaryTree.java
BaseballGame.java
BaseballGame.java
BestTimeToBuyandSellStock2.java
BestTimeToBuyandSellStock2.java
BestTimetoBuyandSellStock.java
BestTimetoBuyandSellStock.java
BinaryTreeLevelOrderTraversal.java
BinaryTreeLevelOrderTraversal.java
BinaryTreeLevelOrderTraversal2.java
BinaryTreeLevelOrderTraversal2.java
BinaryTreePaths.java
BinaryTreePaths.java
BinaryTreeTIlt.java
BinaryTreeTIlt.java
CanPlaceFlowers.java
CanPlaceFlowers.java
ClimbingStairs.java
ClimbingStairs.java
ConstructRectangle.java
ConstructRectangle.java
ConstructStringfromBinaryTree.java
ConstructStringfromBinaryTree.java
ContainsDuplicate.java
ContainsDuplicate.java
ContainsDuplicateII.java
ContainsDuplicateII.java
ConverstBSTtoGreaterTree.java
ConverstBSTtoGreaterTree.java
ConvertaNumbertoHexadecimal.java
ConvertaNumbertoHexadecimal.java
CountAndSay.java
CountAndSay.java
CountPrimes.java
CountPrimes.java
DegreeOfAnArray.java
DegreeOfAnArray.java
DeleteNodeSingleLinkedList.java
DeleteNodeSingleLinkedList.java
DiameterofBinaryTree.java
DiameterofBinaryTree.java
FileSystem.java
FileSystem.java
FindAllAnagramsinString.java
FindAllAnagramsinString.java
FindAllNumbersDisappearedinanArray.java
FindAllNumbersDisappearedinanArray.java
FindModeinBST.java
FindModeinBST.java
FindPivotIndex.java
FindPivotIndex.java
FindSmallestLetterGreaterThanTarget.java
FindSmallestLetterGreaterThanTarget.java
FindSumOfALlLeftLeavesBT.java
FindSumOfALlLeftLeavesBT.java
FindtheDifference389.java
FindtheDifference389.java
FirstUniqueCharacterinaString.java
FirstUniqueCharacterinaString.java
FirstbadVersion.java
FirstbadVersion.java
FizzBuzz.java
FizzBuzz.java
FlippinganImage.java
FlippinganImage.java
GenerateParenthesis.java
GenerateParenthesis.java
GuessNumberHigherorLower.java
GuessNumberHigherorLower.java
HammingDistance.java
HammingDistance.java
HappyNumber.java
HappyNumber.java
HouseRobber.java
HouseRobber.java
ImageSmoother.java
ImageSmoother.java
ImplementQueueusingStacks.java
ImplementQueueusingStacks.java
ImplementStackUsingQueues.java
ImplementStackUsingQueues.java
ImplementstrSt.java
ImplementstrSt.java
InsertionBit.java
InsertionBit.java
IntersectOfTwoArrray2.java
IntersectOfTwoArrray2.java
IntersectionOfTwoArrays.java
IntersectionOfTwoArrays.java
IntersectionofTwoLinkedLists.java
IntersectionofTwoLinkedLists.java
InvertBinaryTree.java
InvertBinaryTree.java
IslandPerimeter.java
IslandPerimeter.java
IsomorphicStrings.java
IsomorphicStrings.java
JewelsAndStones.java
JewelsAndStones.java
JudgeRouteCircle.java
JudgeRouteCircle.java
LargestDifferenceArray.java
LargestDifferenceArray.java
LeafSimilarTrees.java
LeafSimilarTrees.java
LemonadeChange.java
LemonadeChange.java
LengthofLastWord.java
LengthofLastWord.java
LetterCasePermutation.java
LetterCasePermutation.java
LinkedListCycle.java
LinkedListCycle.java
LongestCommonPrefix.java
LongestCommonPrefix.java
LongestContinuousIncreasingSubsequence.java
LongestContinuousIncreasingSubsequence.java
LongestHarmoniousSubsequence.java
LongestHarmoniousSubsequence.java
LongestPalindrome.java
LongestPalindrome.java
LowestCommonAncestorBST.java
LowestCommonAncestorBST.java
MagicalString.java
MagicalString.java
MajorityElement.java
MajorityElement.java
MaxAreaOfIsland.java
MaxAreaOfIsland.java
MaxConsecutiveZeros.java
MaxConsecutiveZeros.java
MaximizeDistancetoClosestPerson.java
MaximizeDistancetoClosestPerson.java
MaximumDepthofBinaryTree.java
MaximumDepthofBinaryTree.java
MergeSortedArray.java
MergeSortedArray.java
MergeTwoSortedLists.java
MergeTwoSortedLists.java
MiddleoftheLinkedList.java
MiddleoftheLinkedList.java
MinCostClimbingStairs.java
MinCostClimbingStairs.java
MinStack.java
MinStack.java
MinimumAbsoluteDifferenceinBST.java
MinimumAbsoluteDifferenceinBST.java
MinimumDepthofBinaryTree.java
MinimumDepthofBinaryTree.java
MinimumDistanceBetweenBSTNodes.java
MinimumDistanceBetweenBSTNodes.java
MinimumMovesToEqualArray.java
MinimumMovesToEqualArray.java
MinimumTimeDifference.java
MinimumTimeDifference.java
MostCommonWord.java
MostCommonWord.java
NumberComplement.java
NumberComplement.java
NumberofSegmentsinaString.java
NumberofSegmentsinaString.java
PaintFill.java
PaintFill.java
Palindrome2.java
Palindrome2.java
PalindromeLinkedList.java
PalindromeLinkedList.java
PalindromeNumber.java
PalindromeNumber.java
PalindromePermutation.java
PalindromePermutation.java
Pangram.java
Pangram.java
PascalsTriangle.java
PascalsTriangle.java
PascalsTriangle2.java
PascalsTriangle2.java
PathSum.java
PathSum.java
PathSum3.java
PathSum3.java
PerfectNumber.java
PerfectNumber.java
PositionsofLargeGroups.java
PositionsofLargeGroups.java
View all files
You can’t perform that action at this time.