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 }}
KTimber
leetcode
Repository navigation
Code
Pull requests
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
..
001_Two_Sum.java
001_Two_Sum.java
002_Add_Two_Numbers.java
002_Add_Two_Numbers.java
003_Longest_Substring_Without_Repeating_Characters.java
003_Longest_Substring_Without_Repeating_Characters.java
004_Median_of_Two_Sorted_Arrays.java
004_Median_of_Two_Sorted_Arrays.java
005_Longest_Palindromic_Substring.java
005_Longest_Palindromic_Substring.java
006_ZigZag_Conversion.java
006_ZigZag_Conversion.java
007_Reverse_Integer.java
007_Reverse_Integer.java
008_String_to_Integer(atoi).java
008_String_to_Integer(atoi).java
009_Palindrome_Number.java
009_Palindrome_Number.java
1064_Fixed_Point.java
1064_Fixed_Point.java
155_Min_Stack.java
155_Min_Stack.java
179_Largest_Number.java
179_Largest_Number.java
215_Kth_Largest_Element_in_an_Array.java
215_Kth_Largest_Element_in_an_Array.java
223_Rectangle_Area.java
223_Rectangle_Area.java
236_Lowest_Common_Ancestor_of_a_Binary_Tree.java
236_Lowest_Common_Ancestor_of_a_Binary_Tree.java
238_Product_of_Array_Except_Self.java
238_Product_of_Array_Except_Self.java
253_Meeting_Rooms_II.java
253_Meeting_Rooms_II.java
268_Missing_Number.java
268_Missing_Number.java
273_Integer_to_English_Words.java
273_Integer_to_English_Words.java
336_Palindrome_Pairs.java
336_Palindrome_Pairs.java
347_Top_K_Frequent_Elements.java
347_Top_K_Frequent_Elements.java
367_Valid_Perfect_Square.java
367_Valid_Perfect_Square.java
383_Ransom_Note.java
383_Ransom_Note.java
387_First_Unique_Character_in_a_String.java
387_First_Unique_Character_in_a_String.java
389_Find_the_Difference.java
389_Find_the_Difference.java
400_Nth_Digit.java
400_Nth_Digit.java
401_Binary_Watch.java
401_Binary_Watch.java
404_Sum_of_Left_Leaves.java
404_Sum_of_Left_Leaves.java
405_Convert_a_Number_to_Hexadecimal.java
405_Convert_a_Number_to_Hexadecimal.java
409_Longest_Palindrome.java
409_Longest_Palindrome.java
412_Fizz_Buzz.java
412_Fizz_Buzz.java
414_Third_Maximum_Number.java
414_Third_Maximum_Number.java
415_Add_Strings.java
415_Add_Strings.java
434_Number_of_Segments_in_a_String.java
434_Number_of_Segments_in_a_String.java
437_Path_Sum_III.java
437_Path_Sum_III.java
438_Find_All_Anagrams_in_a_String.java
438_Find_All_Anagrams_in_a_String.java
443_String_Compression.java
443_String_Compression.java
448_Find_All_Numbers_Disappeared_in_an_Array.java
448_Find_All_Numbers_Disappeared_in_an_Array.java
453_Minimum_Moves_to_Equal_Array_Elements.java
453_Minimum_Moves_to_Equal_Array_Elements.java
458_Poor_Pigs.java
458_Poor_Pigs.java
461_Hamming_Distance.java
461_Hamming_Distance.java
463_Island_Perimeter.java
463_Island_Perimeter.java
475_Heaters.java
475_Heaters.java
479_Largest_Palindrome_Product.java
479_Largest_Palindrome_Product.java
482_License_Key_Formatting.java
482_License_Key_Formatting.java
509_Fibonacci_Number.java
509_Fibonacci_Number.java
538_Convert_BST_to_Greater_Tree.java
538_Convert_BST_to_Greater_Tree.java
543_Diameter_of_Binary_Tree.java
543_Diameter_of_Binary_Tree.java
547_Friend_Circles.java
547_Friend_Circles.java
557_Reverse_Words_in_a_String_III.java
557_Reverse_Words_in_a_String_III.java
560_Subarray_Sum_Equals_K.java
560_Subarray_Sum_Equals_K.java
572_Subtree_of_Another_Tree.java
572_Subtree_of_Another_Tree.java
581_Shortest_Unsorted_Continuous_Subarray.java
581_Shortest_Unsorted_Continuous_Subarray.java
605_Can_Place_Flowers.java
605_Can_Place_Flowers.java
617_Merge_Two_Binary_Trees.java
617_Merge_Two_Binary_Trees.java
628_Maximum_Product_of_Three_Numbers.java
628_Maximum_Product_of_Three_Numbers.java
654_Maximum_Binary_Tree.java
654_Maximum_Binary_Tree.java
671_Second_Minimum_Node_In_a_Binary_Tree.java
671_Second_Minimum_Node_In_a_Binary_Tree.java
674_Longest_Continuous_Increasing_Subsequence.java
674_Longest_Continuous_Increasing_Subsequence.java
680_Valid_Palindrome_II.java
680_Valid_Palindrome_II.java
692_Top_K_Frequent_Words.java
692_Top_K_Frequent_Words.java
695_Max_Area_of_Island.java
695_Max_Area_of_Island.java
697_Degree_of_an_Array.java
697_Degree_of_an_Array.java
700_Search_in_a_Binary_Search_Tree.java
700_Search_in_a_Binary_Search_Tree.java
703_Kth_Largest_Element_in_a_Stream.java
703_Kth_Largest_Element_in_a_Stream.java
706_Design_HashMap.java
706_Design_HashMap.java
709_To_Lower_Case.java
709_To_Lower_Case.java
716_Max_Stack.java
716_Max_Stack.java
720_Longest_Word_in_Dictionary.java
720_Longest_Word_in_Dictionary.java
724_Find_Pivot_Index.java
724_Find_Pivot_Index.java
733_Flood_Fill.java
733_Flood_Fill.java
743_Network_Delay_Time.java
743_Network_Delay_Time.java
751_IP_to_CIDR.java
751_IP_to_CIDR.java
760_Find_Anagram_Mappings.java
760_Find_Anagram_Mappings.java
766_Toeplitz_Matrix.java
766_Toeplitz_Matrix.java
771_Jewels_and_Stones.java
771_Jewels_and_Stones.java
784_Letter_Case_Permutation.java
784_Letter_Case_Permutation.java
804_Unique_Morse_Code_Words.java
804_Unique_Morse_Code_Words.java
811_Subdomain_Visit_Count.java
811_Subdomain_Visit_Count.java
819_Most_Common_Word.java
819_Most_Common_Word.java
832_Flipping_an_Image.java
832_Flipping_an_Image.java
836_Rectangle_Overlap.java
836_Rectangle_Overlap.java
844_Backspace_String_Compare.java
844_Backspace_String_Compare.java
852_Peak_Index_in_a_Mountain_Array.java
852_Peak_Index_in_a_Mountain_Array.java
867_Transpose_Matrix.java
867_Transpose_Matrix.java
872_Leaf-Similar_Trees.java
872_Leaf-Similar_Trees.java
876_Middle_of_the_Linked_List.java
876_Middle_of_the_Linked_List.java
904_Fruit_Into_Baskets.java
904_Fruit_Into_Baskets.java
905_Sort_Array_By_Parity.java
905_Sort_Array_By_Parity.java
922_Sort_Array_By_Parity_II.java
922_Sort_Array_By_Parity_II.java
929_Unique_Email_Addresses.java
929_Unique_Email_Addresses.java
933_Number_of_Recent_Calls.java
933_Number_of_Recent_Calls.java
937_Reorder_Log_Files.java
937_Reorder_Log_Files.java
945_Minimum_Increment_to_Make_Array_Unique.java
945_Minimum_Increment_to_Make_Array_Unique.java
946_Validate_Stack_Sequences.java
946_Validate_Stack_Sequences.java
953_Verifying_an_Alien_Dictionary.java
953_Verifying_an_Alien_Dictionary.java
954_Array_of_Doubled_Pairs.java
954_Array_of_Doubled_Pairs.java
961_N-Repeated_Element_in_Size_2N_Array.java
961_N-Repeated_Element_in_Size_2N_Array.java
962_Maximum_Width_Ramp.java
962_Maximum_Width_Ramp.java
977_Squares_of_a_Sorted_Array.java
977_Squares_of_a_Sorted_Array.java
View all files
You can’t perform that action at this time.