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 }}
ajdev07
leetcode-patterns
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
solutions
Breadcrumbs
leetcode-patterns
/
Arrays
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
solutions
Breadcrumbs
leetcode-patterns
/
Arrays
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
1089_Duplicate_Zeros.java
1089_Duplicate_Zeros.java
118_Pascale_Triangle.java
118_Pascale_Triangle.java
119_Pascale_Triangle_II.java
119_Pascale_Triangle_II.java
121_Best_Time_to_Buy_and_Sell_Stock.java
121_Best_Time_to_Buy_and_Sell_Stock.java
122_Best_Time_to_Buy_and_Sell_Stock_II.java
122_Best_Time_to_Buy_and_Sell_Stock_II.java
128_Longest_Consecutive_Sequence.java
128_Longest_Consecutive_Sequence.java
134_Gas_Station.java
134_Gas_Station.java
149_Max_Points_on_a_Line.java
149_Max_Points_on_a_Line.java
152_Maximum_Product_Subarray.java
152_Maximum_Product_Subarray.java
1570_Dot_Product_of_Two_Sparse_Vectors.java
1570_Dot_Product_of_Two_Sparse_Vectors.java
15_3Sum.java
15_3Sum.java
169_Majority_Element.java
169_Majority_Element.java
218_The_Skyline_Problem.java
218_The_Skyline_Problem.java
219_Contains_Duplicate_II.java
219_Contains_Duplicate_II.java
238_Product_Of_Array_Except_Itself.java
238_Product_Of_Array_Except_Itself.java
268_Missing_Number.java
268_Missing_Number.java
26_Remove_Duplicates_from_Sorted_Array.java
26_Remove_Duplicates_from_Sorted_Array.java
277_Find_the_Celebrity.java
277_Find_the_Celebrity.java
27_Remove_Element.java
27_Remove_Element.java
283_Move_Zeroes.java
283_Move_Zeroes.java
287_Find_the_Duplicate_Number.java
287_Find_the_Duplicate_Number.java
308_Range_Sum_Query_2D_-_Mutable.java
308_Range_Sum_Query_2D_-_Mutable.java
31_Next_Permutation.java
31_Next_Permutation.java
324_Wiggle_Sort_II.java
324_Wiggle_Sort_II.java
334_Increasing_Triplet_Subsequence.java
334_Increasing_Triplet_Subsequence.java
349_Intersection_of_Two_Arrays.java
349_Intersection_of_Two_Arrays.java
350_Intersection_of_Two_Arrays_II.java
350_Intersection_of_Two_Arrays_II.java
383_Ransom_Note.java
383_Ransom_Note.java
406_Queue_Reconstruction_by_Height.java
406_Queue_Reconstruction_by_Height.java
41_First_Missing_Positive.java
41_First_Missing_Positive.java
442_Find_All_Duplicates_in_an_Array.java
442_Find_All_Duplicates_in_an_Array.java
448_Find_All_Numbers_Disappeared_in_an_Array.java
448_Find_All_Numbers_Disappeared_in_an_Array.java
454_4Sum_II.java
454_4Sum_II.java
532_K-diff_Pairs_in_an_Array.java
532_K-diff_Pairs_in_an_Array.java
53_Maximum_Subarray.java
53_Maximum_Subarray.java
560_Subarray_Sum_Equals_K.java
560_Subarray_Sum_Equals_K.java
581_Shortest_Unsorted_Continuous_Subarray.java
581_Shortest_Unsorted_Continuous_Subarray.java
599_Minimum_Index_Sum_of_Two_Lists.java
599_Minimum_Index_Sum_of_Two_Lists.java
609_Find_Duplicate_File_in_System.java
609_Find_Duplicate_File_in_System.java
665_Non-decreasing_Array.java
665_Non-decreasing_Array.java
66_Plus_One.java
66_Plus_One.java
697_Degree_of_an_Array.java
697_Degree_of_an_Array.java
724_Find_Pivot_Index.java
724_Find_Pivot_Index.java
88_Merge_Sorted_Array.java
88_Merge_Sorted_Array.java
912_Sort_an_Array.java
912_Sort_an_Array.java
945_Minimum_Increment_to_Make_Array_Unique.java
945_Minimum_Increment_to_Make_Array_Unique.java
View all files
You can’t perform that action at this time.