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
Events
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 }}
Pthinker
algorithm_java
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
algorithm_java
/
leetcode
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
algorithm_java
/
leetcode
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
.DS_Store
.DS_Store
132-pattern.java
132-pattern.java
3Sum.java
3Sum.java
3Sum_Smaller.java
3Sum_Smaller.java
3sum-closest.java
3sum-closest.java
4Sum.java
4Sum.java
4sum-ii.java
4sum-ii.java
Add_Two_Numbers.java
Add_Two_Numbers.java
Alien_Dictionary.java
Alien_Dictionary.java
Anagrams.java
Anagrams.java
Android_Unlock_Patterns.java
Android_Unlock_Patterns.java
Balanced_Binary_Tree.java
Balanced_Binary_Tree.java
Best_Meeting_Point.java
Best_Meeting_Point.java
Best_Time_to_Buy_and_Sell_Stock_II.java
Best_Time_to_Buy_and_Sell_Stock_II.java
Best_Time_to_Buy_and_Sell_Stock_III.java
Best_Time_to_Buy_and_Sell_Stock_III.java
Binary Tree Longest Consecutive Sequence.java
Binary Tree Longest Consecutive Sequence.java
Binary_Tree_Inorder_Traversal.java
Binary_Tree_Inorder_Traversal.java
Binary_Tree_Level_Order_Traversal.java
Binary_Tree_Level_Order_Traversal.java
Binary_Tree_Level_Order_Traversal_II.java
Binary_Tree_Level_Order_Traversal_II.java
Binary_Tree_Maximum_Path_Sum.java
Binary_Tree_Maximum_Path_Sum.java
Binary_Tree_Upside_Down.java
Binary_Tree_Upside_Down.java
Binary_Tree_Vertical_Order_Traversal.java
Binary_Tree_Vertical_Order_Traversal.java
Binary_Tree_Zigzag_Level_Order_Traversal.java
Binary_Tree_Zigzag_Level_Order_Traversal.java
Bomb_Enemy.java
Bomb_Enemy.java
Climbing_Stairs.java
Climbing_Stairs.java
Closest Binary Search Tree Value II.java
Closest Binary Search Tree Value II.java
Closest_Binary_Search_Tree_Value.java
Closest_Binary_Search_Tree_Value.java
Combination_Sum.java
Combination_Sum.java
Combination_Sum_II.java
Combination_Sum_II.java
Combinations.java
Combinations.java
Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.java
Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.java
Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.java
Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.java
Container_With_Most_Water.java
Container_With_Most_Water.java
Continuous Subarray Sum.java
Continuous Subarray Sum.java
Convert_Sorted_Array_to_Binary_Search_Tree.java
Convert_Sorted_Array_to_Binary_Search_Tree.java
Convert_Sorted_List_to_Binary_Search_Tree.java
Convert_Sorted_List_to_Binary_Search_Tree.java
Convex_Polygon.java
Convex_Polygon.java
Count_Univalue_Subtrees.java
Count_Univalue_Subtrees.java
Count_and_Say.java
Count_and_Say.java
Decode_Ways.java
Decode_Ways.java
Design_Hit_Counter.java
Design_Hit_Counter.java
Design_Phone_Directory.java
Design_Phone_Directory.java
Design_Snake_Game.java
Design_Snake_Game.java
Design_Tic-Tac-Toe.java
Design_Tic-Tac-Toe.java
Divide_Two_Integers.java
Divide_Two_Integers.java
Encode String with Shortest Length.java
Encode String with Shortest Length.java
Encode_and_Decode_Strings.java
Encode_and_Decode_Strings.java
Factor_Combinations.java
Factor_Combinations.java
Find_Leaves_of_Binary_Tree.java
Find_Leaves_of_Binary_Tree.java
Find_Permutation.java
Find_Permutation.java
Find_the_Celebrity.java
Find_the_Celebrity.java
First_Missing_Positive.java
First_Missing_Positive.java
Flatten_2D_Vector.java
Flatten_2D_Vector.java
Flip_Game_II.java
Flip_Game_II.java
Generalized_Abbreviation.java
Generalized_Abbreviation.java
Generate_Parentheses.java
Generate_Parentheses.java
Graph_Valid_Tree.java
Graph_Valid_Tree.java
Group_Anagrams.java
Group_Anagrams.java
Group_Shifted_Strings.java
Group_Shifted_Strings.java
HappyNumber.java
HappyNumber.java
House_Robber.java
House_Robber.java
Implement_strStr.java
Implement_strStr.java
Inorder_Successor_in_BST.java
Inorder_Successor_in_BST.java
Insert_Interval.java
Insert_Interval.java
Integer_to_Roman.java
Integer_to_Roman.java
Interleaving_String.java
Interleaving_String.java
Jump_Game.java
Jump_Game.java
Jump_Game_II.java
Jump_Game_II.java
Largest_BST_Subtree.java
Largest_BST_Subtree.java
Largest_Rectangle_in_Histogram.java
Largest_Rectangle_in_Histogram.java
Letter_Combinations_of_a_Phone_Number.java
Letter_Combinations_of_a_Phone_Number.java
Line-Reflection.java
Line-Reflection.java
Logger_Rate_Limiter.java
Logger_Rate_Limiter.java
Longest Substring with At Most K Distinct Characters.java
Longest Substring with At Most K Distinct Characters.java
Longest Substring with At Most Two Distinct Characters.java
Longest Substring with At Most Two Distinct Characters.java
Longest_Common_Prefix.java
Longest_Common_Prefix.java
Longest_Consecutive_Sequence.java
Longest_Consecutive_Sequence.java
Longest_Substring_Without_Repeating_Characters.java
Longest_Substring_Without_Repeating_Characters.java
Longest_Valid_Parentheses.java
Longest_Valid_Parentheses.java
Max_Consecutive_Ones_II.java
Max_Consecutive_Ones_II.java
Maximal_Rectangle.java
Maximal_Rectangle.java
Maximum_Depth_of_Binary_Tree.java
Maximum_Depth_of_Binary_Tree.java
Maximum_Size_Subarray_Sum_Equals_k.java
Maximum_Size_Subarray_Sum_Equals_k.java
Median_of_Two_Sorted_Arrays.java
Median_of_Two_Sorted_Arrays.java
Meeting_Rooms.java
Meeting_Rooms.java
Meeting_Rooms_II.java
Meeting_Rooms_II.java
Merge_Intervals.java
Merge_Intervals.java
Merge_Sorted_Array.java
Merge_Sorted_Array.java
Merge_Two_Sorted_Lists.java
Merge_Two_Sorted_Lists.java
Merge_k_Sorted_Lists.java
Merge_k_Sorted_Lists.java
Minimum Unique Word Abbreviation.java
Minimum Unique Word Abbreviation.java
Minimum_Depth_of_Binary_Tree.java
Minimum_Depth_of_Binary_Tree.java
Minimum_Path_Sum.java
Minimum_Path_Sum.java
Missing_Ranges.java
Missing_Ranges.java
Moving_Average_from_Data_Stream.java
Moving_Average_from_Data_Stream.java
Nested_List_Weight_Sum.java
Nested_List_Weight_Sum.java
Nested_List_Weight_Sum_II.java
Nested_List_Weight_Sum_II.java
Next_Permutation.java
Next_Permutation.java
Number of Connected Components in an Undirected Graph.java
Number of Connected Components in an Undirected Graph.java
Number-of-Islands-II.java
Number-of-Islands-II.java
View all files
You can’t perform that action at this time.
⌂ Proxy