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
/
medium
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
AlgoDS
/
src
/
problems
/
medium
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
AccountMerge.java
AccountMerge.java
AddTwoNumbers.java
AddTwoNumbers.java
AddTwoNumbers2.java
AddTwoNumbers2.java
AdvantageShuffle.java
AdvantageShuffle.java
AlienAlphabet.java
AlienAlphabet.java
AllNodesDistanceKinBinaryTree.java
AllNodesDistanceKinBinaryTree.java
AllPathFromSourceToTarget.java
AllPathFromSourceToTarget.java
AnimalShelter.java
AnimalShelter.java
ArrayNesting.java
ArrayNesting.java
AsteroidCollision.java
AsteroidCollision.java
BSTSequences.java
BSTSequences.java
BattleShipsInBoard.java
BattleShipsInBoard.java
BeautifulArrangement.java
BeautifulArrangement.java
BinarySearchTreeIterator.java
BinarySearchTreeIterator.java
BinaryTreeInorderTraversal.java
BinaryTreeInorderTraversal.java
BinaryTreeLeftSIdeView.java
BinaryTreeLeftSIdeView.java
BinaryTreePreorderTraversal.java
BinaryTreePreorderTraversal.java
BinaryTreePruning.java
BinaryTreePruning.java
BinaryTreeRightSideView.java
BinaryTreeRightSideView.java
BoatstoSavePeople.java
BoatstoSavePeople.java
CBTInserter.java
CBTInserter.java
CarFleet.java
CarFleet.java
CheapestFlightsWithinKStops.java
CheapestFlightsWithinKStops.java
CloneGraph.java
CloneGraph.java
CoinChange.java
CoinChange.java
CoinChange2.java
CoinChange2.java
Combination.java
Combination.java
CombinationSum.java
CombinationSum.java
CombinationSum2.java
CombinationSum2.java
CombinationSum3.java
CombinationSum3.java
CompareVersion.java
CompareVersion.java
ConsecutiveNumbersSum.java
ConsecutiveNumbersSum.java
ConstructBTFromPreOrderAndInorder.java
ConstructBTFromPreOrderAndInorder.java
ConstructBinaryTreefromString.java
ConstructBinaryTreefromString.java
ContainerWithMostWater.java
ContainerWithMostWater.java
ContinuousSubarraySum.java
ContinuousSubarraySum.java
ConvertBSTToGreaterTree.java
ConvertBSTToGreaterTree.java
ConvertSortedArraytoBinarySearchTree.java
ConvertSortedArraytoBinarySearchTree.java
ConvertSortedListtoBinarySearchTree.java
ConvertSortedListtoBinarySearchTree.java
CountCompleteBinarytree.java
CountCompleteBinarytree.java
CountEval.java
CountEval.java
CountingBits.java
CountingBits.java
CourseSchedule.java
CourseSchedule.java
CourseScheduleII.java
CourseScheduleII.java
CustomSortString.java
CustomSortString.java
DailyTemperature.java
DailyTemperature.java
DecodeString.java
DecodeString.java
DecodeWays.java
DecodeWays.java
DeleteNodeinaBST.java
DeleteNodeinaBST.java
EggDropPuzzle.java
EggDropPuzzle.java
EmployeeImportance.java
EmployeeImportance.java
EncodeandDecodeTinyURL.java
EncodeandDecodeTinyURL.java
EqualTreePartition.java
EqualTreePartition.java
EvaluateReversePolishNotation.java
EvaluateReversePolishNotation.java
FIndAndReplacePattern.java
FIndAndReplacePattern.java
FindAllDuplicatesinanArray.java
FindAllDuplicatesinanArray.java
FindAndReplaceString.java
FindAndReplaceString.java
FindDuplicateFileinSystem.java
FindDuplicateFileinSystem.java
FindDuplicateSubtrees.java
FindDuplicateSubtrees.java
FindEventualSafeStates.java
FindEventualSafeStates.java
FindKClosestElements.java
FindKClosestElements.java
FindLargestElementinEachRow.java
FindLargestElementinEachRow.java
FindLeftMostElement.java
FindLeftMostElement.java
FindMinimuminRotatedSortedArray.java
FindMinimuminRotatedSortedArray.java
FindPeakElement.java
FindPeakElement.java
FindRightInterval.java
FindRightInterval.java
FlattenBinaryTreetoLinkedList.java
FlattenBinaryTreetoLinkedList.java
FlattenDictionary.java
FlattenDictionary.java
FlattenNestedListIterator.java
FlattenNestedListIterator.java
FourSumII.java
FourSumII.java
FriendsCycle.java
FriendsCycle.java
GameofLife.java
GameofLife.java
GasStation.java
GasStation.java
HIndex.java
HIndex.java
HandofStraights.java
HandofStraights.java
HouseRober2.java
HouseRober2.java
IncreasingSubsequences.java
IncreasingSubsequences.java
InsertIntoBST.java
InsertIntoBST.java
InsertionSortList.java
InsertionSortList.java
IntegerBreak.java
IntegerBreak.java
IntegertoRoman.java
IntegertoRoman.java
IsGraphBipartite.java
IsGraphBipartite.java
IsSubsequence.java
IsSubsequence.java
JumpGame.java
JumpGame.java
KthLargestElementinanArray.java
KthLargestElementinanArray.java
KthSmallestElementinaBST.java
KthSmallestElementinaBST.java
KthSymbolinGrammar.java
KthSymbolinGrammar.java
LargestBSTSubtree.java
LargestBSTSubtree.java
LargestPlusSign.java
LargestPlusSign.java
LargetElementinRowsBT.java
LargetElementinRowsBT.java
LetterCombinationsofaPhoneNumber.java
LetterCombinationsofaPhoneNumber.java
LicenseKeyFormatting.java
LicenseKeyFormatting.java
LinkedListComponents.java
LinkedListComponents.java
LinkedListCycle2.java
LinkedListCycle2.java
LinkedListRandomNode.java
LinkedListRandomNode.java
LogSystem.java
LogSystem.java
LonelyPixelI.java
LonelyPixelI.java
LongestAbsolutePath.java
LongestAbsolutePath.java
LongestMountaininArray.java
LongestMountaininArray.java
LongestPalindromicSubstring.java
LongestPalindromicSubstring.java
View all files
You can’t perform that action at this time.