Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Type
/
to 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 }}
lhuang9703
/
SolutionsForLeetcode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
master
Branches
Tags
Go to file
Code
Open more actions menu
Folders and files
Name
Name
Last commit message
Last commit date
Latest commit
History
177 Commits
177 Commits
2_Keys_Keyboard.cpp
2_Keys_Keyboard.cpp
3Sum_Closest.cpp
3Sum_Closest.cpp
3sum.cpp
3sum.cpp
4Sum.cpp
4Sum.cpp
Add_Binary.cpp
Add_Binary.cpp
Add_Two_Numbers.cpp
Add_Two_Numbers.cpp
Array_Partition_I.cpp
Array_Partition_I.cpp
Balanced_Binary_Tree.cpp
Balanced_Binary_Tree.cpp
Best_Time_to_Buy_and_Sell_Stock.cpp
Best_Time_to_Buy_and_Sell_Stock.cpp
Best_Time_to_Buy_and_Sell_Stock_II.cpp
Best_Time_to_Buy_and_Sell_Stock_II.cpp
Binary_Tree_Inorder_Traversal.cpp
Binary_Tree_Inorder_Traversal.cpp
Binary_Tree_Level_Order_Traversal.cpp
Binary_Tree_Level_Order_Traversal.cpp
Binary_Tree_Level_Order_Traversal_II.cpp
Binary_Tree_Level_Order_Traversal_II.cpp
Binary_Tree_Maximum_Path_Sum.cpp
Binary_Tree_Maximum_Path_Sum.cpp
Binary_Tree_Paths.cpp
Binary_Tree_Paths.cpp
Binary_Tree_Right_Side_View.cpp
Binary_Tree_Right_Side_View.cpp
Binary_Tree_Zigzag_Level_Order_Traversal.cpp
Binary_Tree_Zigzag_Level_Order_Traversal.cpp
Bulls_and_Cows.cpp
Bulls_and_Cows.cpp
Choose_Monkey_King.cpp
Choose_Monkey_King.cpp
Combination_Sum.cpp
Combination_Sum.cpp
Combination_Sum_II.cpp
Combination_Sum_II.cpp
Combination_Sum_III.cpp
Combination_Sum_III.cpp
Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.cpp
Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.cpp
Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp
Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp
Container_With_Most_Water.cpp
Container_With_Most_Water.cpp
Contains_Duplicate.cpp
Contains_Duplicate.cpp
Convert_Sorted_Array_to_Binary_Search_Tree.cpp
Convert_Sorted_Array_to_Binary_Search_Tree.cpp
Count_Primes.cpp
Count_Primes.cpp
Count_and_Say.cpp
Count_and_Say.cpp
Decode_Ways.cpp
Decode_Ways.cpp
Degree_of_an_Array.cpp
Degree_of_an_Array.cpp
Edit_Distance.cpp
Edit_Distance.cpp
Factorial_Trailing_Zeroes.cpp
Factorial_Trailing_Zeroes.cpp
Find_Biggest_Square.cpp
Find_Biggest_Square.cpp
Find_First_and_Last_Position_of_Element_in_Sorted_Array.cpp
Find_First_and_Last_Position_of_Element_in_Sorted_Array.cpp
Find_Minimum_in_Rotated_Sorted_Array.cpp
Find_Minimum_in_Rotated_Sorted_Array.cpp
Find_Peak_Element.cpp
Find_Peak_Element.cpp
Find_the_Duplicate_Number.cpp
Find_the_Duplicate_Number.cpp
First_Bad_Version.cpp
First_Bad_Version.cpp
First_Missing_Positive.cpp
First_Missing_Positive.cpp
Flatten_Binary_Tree_to_Linked_List.cpp
Flatten_Binary_Tree_to_Linked_List.cpp
Fraction_to_Recurring_Decimal.cpp
Fraction_to_Recurring_Decimal.cpp
Generate_Parentheses.cpp
Generate_Parentheses.cpp
Group_Anagrams.cpp
Group_Anagrams.cpp
H-Index.cpp
H-Index.cpp
Happy_Number.cpp
Happy_Number.cpp
House_Robber.cpp
House_Robber.cpp
Implement_Queue_using_Stacks.cpp
Implement_Queue_using_Stacks.cpp
Implement_Stack_using_Queues.cpp
Implement_Stack_using_Queues.cpp
Implement_Trie_(Prefix Tree).cpp
Implement_Trie_(Prefix Tree).cpp
Increasing_Triplet_Subsequence.cpp
Increasing_Triplet_Subsequence.cpp
Intersection_of_Two_Linked_Lists.cpp
Intersection_of_Two_Linked_Lists.cpp
Invert_Binary_Tree.cpp
Invert_Binary_Tree.cpp
Isomorphic_Strings.cpp
Isomorphic_Strings.cpp
Jump_Game.cpp
Jump_Game.cpp
Jump_Game_II.cpp
Jump_Game_II.cpp
K-diff_Pairs_in_an_Array.cpp
K-diff_Pairs_in_an_Array.cpp
Knight_Probability_in_Chessboard.cpp
Knight_Probability_in_Chessboard.cpp
Kth_Smallest_Element_in_a_BST.cpp
Kth_Smallest_Element_in_a_BST.cpp
Largest_Perimeter_Triangle.cpp
Largest_Perimeter_Triangle.cpp
Largest_Rectangle_in_Histogram.cpp
Largest_Rectangle_in_Histogram.cpp
Length_of_Last_Word.cpp
Length_of_Last_Word.cpp
Linked_List_Cycle.cpp
Linked_List_Cycle.cpp
Linked_List_Cycle_II.cpp
Linked_List_Cycle_II.cpp
Longest_Common_Prefix.cpp
Longest_Common_Prefix.cpp
Longest_Increasing_Subsequence.cpp
Longest_Increasing_Subsequence.cpp
Longest_Palindromic_Substring.cpp
Longest_Palindromic_Substring.cpp
Lowest_Common_Ancestor_of_a_Binary_Tree.cpp
Lowest_Common_Ancestor_of_a_Binary_Tree.cpp
Majority_Element.cpp
Majority_Element.cpp
Maximal_Square.cpp
Maximal_Square.cpp
Maximize_Distance_to_Closest_Person.cpp
Maximize_Distance_to_Closest_Person.cpp
Maximum_Depth_of_Binary_Tree.cpp
Maximum_Depth_of_Binary_Tree.cpp
Maximum_Product_Subarray.cpp
Maximum_Product_Subarray.cpp
Maximum_Subarray.cpp
Maximum_Subarray.cpp
Merge_Intervals.cpp
Merge_Intervals.cpp
Merge_Sorted_Array.cpp
Merge_Sorted_Array.cpp
Min_Stack.cpp
Min_Stack.cpp
Minimum_Depth_of_Binary_Tree.cpp
Minimum_Depth_of_Binary_Tree.cpp
Minimum_Increment_to_Make_Array_Unique.cpp
Minimum_Increment_to_Make_Array_Unique.cpp
Minimum_Path_Sum.cpp
Minimum_Path_Sum.cpp
Minimum_Score_Triangulation_of_Polygon.cpp
Minimum_Score_Triangulation_of_Polygon.cpp
Minimum_Size_Subarray_Sum.cpp
Minimum_Size_Subarray_Sum.cpp
Missing_Number.cpp
Missing_Number.cpp
Most_Frequent_Subtree_Sum.cpp
Most_Frequent_Subtree_Sum.cpp
Move_Zeroes.cpp
Move_Zeroes.cpp
N-Queens.cpp
N-Queens.cpp
N-Queens_II.cpp
N-Queens_II.cpp
N-ary_Tree_Postorder_Traversal.cpp
N-ary_Tree_Postorder_Traversal.cpp
N-ary_Tree_Preorder_Traversal.cpp
N-ary_Tree_Preorder_Traversal.cpp
Next_Permutation.cpp
Next_Permutation.cpp
Number_of_Longest_Increasing_Subsequence.cpp
Number_of_Longest_Increasing_Subsequence.cpp
Palindrome_Linked_List.cpp
Palindrome_Linked_List.cpp
Palindromic_Substrings.cpp
Palindromic_Substrings.cpp
Pascal's_Triangle.cpp
Pascal's_Triangle.cpp
Pascal's_Triangle_II.cpp
Pascal's_Triangle_II.cpp
Path_Sum.cpp
Path_Sum.cpp
Path_Sum_II.cpp
Path_Sum_II.cpp
Perfect_Squares.cpp
Perfect_Squares.cpp
Permutations.cpp
Permutations.cpp
Permutations_II.cpp
Permutations_II.cpp
View all files
Repository files navigation
README
More
items
Solutions for leetcode
About
Solutions for leetcode
Resources
Readme
Activity
Stars
1
star
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.