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
Small and medium teams
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 }}
AlgorithmsWorld
JavaAlgosSet1
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
JavaAlgosSet1
/
src
/
main
/
java
/
com
/
rampatra
/
arrays
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
JavaAlgosSet1
/
src
/
main
/
java
/
com
/
rampatra
/
arrays
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
ArrangeNosToFormBiggestNo.java
ArrangeNosToFormBiggestNo.java
BooleanMatrix.java
BooleanMatrix.java
CelebrityProblem.java
CelebrityProblem.java
ConsecutiveElements.java
ConsecutiveElements.java
CountDivisors.java
CountDivisors.java
CountSmallerElementsOnRHS.java
CountSmallerElementsOnRHS.java
DistinctPairs.java
DistinctPairs.java
DuplicatesInArray.java
DuplicatesInArray.java
DuplicatesInArrayWithinKDistance.java
DuplicatesInArrayWithinKDistance.java
EqualProbabilityRandomNoGenerator.java
EqualProbabilityRandomNoGenerator.java
EquilibriumIndex.java
EquilibriumIndex.java
FixedPoint.java
FixedPoint.java
FlattenArray.java
FlattenArray.java
IntersectionAndUnionOf2SortedArrays.java
IntersectionAndUnionOf2SortedArrays.java
InversionsInArray.java
InversionsInArray.java
KLargestElements.java
KLargestElements.java
KthLargestElement.java
KthLargestElement.java
LargestProductContiguousSubArray.java
LargestProductContiguousSubArray.java
LargestSumContiguousSubArray.java
LargestSumContiguousSubArray.java
LeadersInArray.java
LeadersInArray.java
LongestBitonicSubArray.java
LongestBitonicSubArray.java
LongestConsecutiveSubsequence.java
LongestConsecutiveSubsequence.java
MajorityElement.java
MajorityElement.java
MajorityElementInSortedArray.java
MajorityElementInSortedArray.java
MatrixInSpiral.java
MatrixInSpiral.java
MaxDiffWithLargerElementAfterSmallerElement.java
MaxDiffWithLargerElementAfterSmallerElement.java
MaxInAllSubArrays.java
MaxInAllSubArrays.java
MaxIndexDiff.java
MaxIndexDiff.java
MaxMinWithMinComparisons.java
MaxMinWithMinComparisons.java
MaxSpan.java
MaxSpan.java
MaximumSizeSquareSubMatrix.java
MaximumSizeSquareSubMatrix.java
MaximumSumNonAdjacentSubSequence.java
MaximumSumNonAdjacentSubSequence.java
MedianOfStream.java
MedianOfStream.java
MedianOfTwoSortedArrays.java
MedianOfTwoSortedArrays.java
MergeArrayOfNIntoArrayOfMPlusN.java
MergeArrayOfNIntoArrayOfMPlusN.java
MinimumDistanceBetweenTwoNos.java
MinimumDistanceBetweenTwoNos.java
MissingAndRepeatingElements.java
MissingAndRepeatingElements.java
MissingNumber.java
MissingNumber.java
NextGreaterElement.java
NextGreaterElement.java
NextLargerNumber.java
NextLargerNumber.java
NthSmallestNumber.java
NthSmallestNumber.java
NumberOccurringOddTimes.java
NumberOccurringOddTimes.java
OccurrencesInSortedArray.java
OccurrencesInSortedArray.java
PairDiff.java
PairDiff.java
PairSum.java
PairSum.java
PivotedBinarySearch.java
PivotedBinarySearch.java
ProductArrayPuzzle.java
ProductArrayPuzzle.java
ReservoirSampling.java
ReservoirSampling.java
ReverseArray.java
ReverseArray.java
RotateArray.java
RotateArray.java
RotateMatrixBy90Degrees.java
RotateMatrixBy90Degrees.java
RotatedIndex.java
RotatedIndex.java
SearchInSorted2DArray.java
SearchInSorted2DArray.java
Segregate0s1sAnd2s.java
Segregate0s1sAnd2s.java
Segregate0sAnd1s.java
Segregate0sAnd1s.java
SegregateEvenAndOddNos.java
SegregateEvenAndOddNos.java
SmallestAndSecondSmallest.java
SmallestAndSecondSmallest.java
SmallestMissingNumber.java
SmallestMissingNumber.java
SortedSubSequence.java
SortedSubSequence.java
SubArrayOfSum.java
SubArrayOfSum.java
SubsetOfArray.java
SubsetOfArray.java
SymmetricDifference.java
SymmetricDifference.java
TripletOfSum.java
TripletOfSum.java
TwoElementsSumClosestToZero.java
TwoElementsSumClosestToZero.java
TwoRepeatingElements.java
TwoRepeatingElements.java
TwoStacksInOneArray.java
TwoStacksInOneArray.java
UnsortedSubArray.java
UnsortedSubArray.java
View all files
You can’t perform that action at this time.