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
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
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 }}
lixiang2017
leetcode
Repository navigation
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
leetcode
/
java
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
leetcode
/
java
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
basic
basic
0001.0_Two_Sum.java
0001.0_Two_Sum.java
0010.0_Regular_Expression_Matching.java
0010.0_Regular_Expression_Matching.java
0011.0_Container_With_Most_Water.java
0011.0_Container_With_Most_Water.java
0031.0_Next_Permutation.java
0031.0_Next_Permutation.java
0035.0_Search_Insert_Position.java
0035.0_Search_Insert_Position.java
0053.0_Maximum_Subarray.java
0053.0_Maximum_Subarray.java
0058.0_Length_of_Last_Word.java
0058.0_Length_of_Last_Word.java
0072.0_Edit_Distance.java
0072.0_Edit_Distance.java
0096.0_Unique_Binary_Search_Trees.java
0096.0_Unique_Binary_Search_Trees.java
0099.0_Recover_Binary_Search_Tree.java
0099.0_Recover_Binary_Search_Tree.java
0104.0_Maximum_Depth_of_Binary_Tree.java
0104.0_Maximum_Depth_of_Binary_Tree.java
0109.0_Convert_Sorted_List_to_Binary_Search_Tree.java
0109.0_Convert_Sorted_List_to_Binary_Search_Tree.java
0122.0_Best_Time_to_Buy_and_Sell_Stock_II.java
0122.0_Best_Time_to_Buy_and_Sell_Stock_II.java
0131.0_Palindrome_Partitioning.java
0131.0_Palindrome_Partitioning.java
0141.0_Linked_List_Cycle.java
0141.0_Linked_List_Cycle.java
0142.0_Linked_List_Cycle_II.java
0142.0_Linked_List_Cycle_II.java
0167.0_Two_Sum_II_-_Input_Array_Is_Sorted.java
0167.0_Two_Sum_II_-_Input_Array_Is_Sorted.java
0172.0_Factorial_Trailing_Zeroes.java
0172.0_Factorial_Trailing_Zeroes.java
0206.0_Reverse_Linked_List.java
0206.0_Reverse_Linked_List.java
0217.0_Contains_Duplicate.java
0217.0_Contains_Duplicate.java
0234.0_Palindrome_Linked_List.java
0234.0_Palindrome_Linked_List.java
0260.0_Single_Number_III.java
0260.0_Single_Number_III.java
0268.0_Missing_Number.java
0268.0_Missing_Number.java
0299.0_Bulls_and_Cows.java
0299.0_Bulls_and_Cows.java
0313.0_Super_Ugly_Number.java
0313.0_Super_Ugly_Number.java
0319.0_Bulb_Switcher.java
0319.0_Bulb_Switcher.java
0347.0_Top_K_Frequent_Elements.java
0347.0_Top_K_Frequent_Elements.java
0380.0_Insert_Delete_GetRandom_O1.java
0380.0_Insert_Delete_GetRandom_O1.java
0387.0_First_Unique_Character_in_a_String.java
0387.0_First_Unique_Character_in_a_String.java
0412.0_Fizz_Buzz.java
0412.0_Fizz_Buzz.java
0417.0_Pacific_Atlantic_Water_Flow.java
0417.0_Pacific_Atlantic_Water_Flow.java
0458.0_Poor_Pigs.java
0458.0_Poor_Pigs.java
0467.0_Unique_Substrings_in_Wraparound_String.java
0467.0_Unique_Substrings_in_Wraparound_String.java
0472.0_Concatenated_Words.java
0472.0_Concatenated_Words.java
0492.0_Construct_the_Rectangle.java
0492.0_Construct_the_Rectangle.java
0494.0_Target_Sum.java
0494.0_Target_Sum.java
0496.0_Next_Greater_Element_I.java
0496.0_Next_Greater_Element_I.java
0502.0_IPO.java
0502.0_IPO.java
0520.0_Detect_Capital.java
0520.0_Detect_Capital.java
0541.0_Reverse_String_II.java
0541.0_Reverse_String_II.java
0543.0_Diameter_of_Binary_Tree.java
0543.0_Diameter_of_Binary_Tree.java
0560.0_Subarray_Sum_Equals_K.java
0560.0_Subarray_Sum_Equals_K.java
0563.0_Binary_Tree_Tilt.java
0563.0_Binary_Tree_Tilt.java
0575.0_Distribute_Candies.java
0575.0_Distribute_Candies.java
0598.0_Range_Addition_II.java
0598.0_Range_Addition_II.java
0647.0_Palindromic_Substrings.java
0647.0_Palindromic_Substrings.java
0703.0_Kth_Largest_Element_in_a_Stream.java
0703.0_Kth_Largest_Element_in_a_Stream.java
0704.0_Binary_Search.java
0704.0_Binary_Search.java
0732.0_My_Calendar_III.java
0732.0_My_Calendar_III.java
0762.0_Prime_Number_of_Set_Bits_in_Binary_Representation.java
0762.0_Prime_Number_of_Set_Bits_in_Binary_Representation.java
0783.0_Minimum_Distance_Between_BST_Nodes.java
0783.0_Minimum_Distance_Between_BST_Nodes.java
0799.0_Champagne_Tower.java
0799.0_Champagne_Tower.java
0804.0_Unique_Morse_Code_Words.java
0804.0_Unique_Morse_Code_Words.java
0806.0_Number_of_Lines_To_Write_String.java
0806.0_Number_of_Lines_To_Write_String.java
0819.0_Most_Common_Word.java
0819.0_Most_Common_Word.java
0829.0_Consecutive_Numbers_Sum.java
0829.0_Consecutive_Numbers_Sum.java
0844.0_Backspace_String_Compare.java
0844.0_Backspace_String_Compare.java
0848.0_Shifting_Letters.java
0848.0_Shifting_Letters.java
0868.0_Binary_Gap.java
0868.0_Binary_Gap.java
0876.0_Middle_of_the_Linked_List.java
0876.0_Middle_of_the_Linked_List.java
0881.0_Boats_to_Save_People.java
0881.0_Boats_to_Save_People.java
0897.0_Increasing_Order_Search_Tree.java
0897.0_Increasing_Order_Search_Tree.java
0899.0_Orderly_Queue.java
0899.0_Orderly_Queue.java
0908.0_Smallest_Range_I.java
0908.0_Smallest_Range_I.java
0929.0_Unique_Email_Addresses.java
0929.0_Unique_Email_Addresses.java
0941.0_Valid_Mountain_Array.java
0941.0_Valid_Mountain_Array.java
0944.0_Delete_Columns_to_Make_Sorted.java
0944.0_Delete_Columns_to_Make_Sorted.java
0997.0_Find_the_Town_Judge.java
0997.0_Find_the_Town_Judge.java
1042.0_Flower_Planting_With_No_Adjacent.java
1042.0_Flower_Planting_With_No_Adjacent.java
1046.0_Last_Stone_Weight.java
1046.0_Last_Stone_Weight.java
1051.0_Height_Checker.java
1051.0_Height_Checker.java
1143.0_Longest_Common_Subsequence.java
1143.0_Longest_Common_Subsequence.java
1154.0_Day_of_the_Year.java
1154.0_Day_of_the_Year.java
1157.0_Online_Majority_Element_In_Subarray.java
1157.0_Online_Majority_Element_In_Subarray.java
1184.0_Distance_Between_Bus_Stops.java
1184.0_Distance_Between_Bus_Stops.java
1209.0_Remove_All_Adjacent_Duplicates_in_String_II.java
1209.0_Remove_All_Adjacent_Duplicates_in_String_II.java
1247.0_Minimum_Swaps_to_Make_Strings_Equal.java
1247.0_Minimum_Swaps_to_Make_Strings_Equal.java
1332.0_Remove_Palindromic_Subsequences.java
1332.0_Remove_Palindromic_Subsequences.java
1342.0_Number_of_Steps_to_Reduce_a_Number_to_Zero.java
1342.0_Number_of_Steps_to_Reduce_a_Number_to_Zero.java
1436.0_Destination_City.java
1436.0_Destination_City.java
1446.0_Consecutive_Characters.java
1446.0_Consecutive_Characters.java
1461.0_Check_If_a_String_Contains_All_Binary_Codes_of_Size_K.java
1461.0_Check_If_a_String_Contains_All_Binary_Codes_of_Size_K.java
1480.0_Running_Sum_of_1d_Array.java
1480.0_Running_Sum_of_1d_Array.java
1539.0_Kth_Missing_Positive_Number.java
1539.0_Kth_Missing_Positive_Number.java
1598.0_Crawler_Log_Folder.java
1598.0_Crawler_Log_Folder.java
16.02.0_Words_Frequency_LCCI.java
16.02.0_Words_Frequency_LCCI.java
17.04.0_Missing_Number_LCCI.java
17.04.0_Missing_Number_LCCI.java
17.17.0_Multi_Search_LCCI.java
17.17.0_Multi_Search_LCCI.java
1721.0_Swapping_Nodes_in_a_Linked_List.java
1721.0_Swapping_Nodes_in_a_Linked_List.java
1752.0_Check_if_Array_Is_Sorted_and_Rotated.java
1752.0_Check_if_Array_Is_Sorted_and_Rotated.java
1784.0_Check_if_Binary_String_Has_at_Most_One_Segment_of_Ones.java
1784.0_Check_if_Binary_String_Has_at_Most_One_Segment_of_Ones.java
1876.0_Substrings_of_Size_Three_with_Distinct_Characters.java
1876.0_Substrings_of_Size_Three_with_Distinct_Characters.java
1929.0_Concatenation_of_Array.java
1929.0_Concatenation_of_Array.java
2140.0_Solving_Questions_With_Brainpower.java
2140.0_Solving_Questions_With_Brainpower.java
2574.0_Left_and_Right_Sum_Differences.java
2574.0_Left_and_Right_Sum_Differences.java
2937.0_Make_Three_Strings_Equal.java
2937.0_Make_Three_Strings_Equal.java
3479.0_Fruits_Into_Baskets_III.java
3479.0_Fruits_Into_Baskets_III.java
5894.0_Two_Out_of_Three.java
5894.0_Two_Out_of_Three.java
Array_of_Doubled_Pairs.java
Array_of_Doubled_Pairs.java
View all files
You can’t perform that action at this time.