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 }}
futureCoder
algorithms
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
algorithms
/
leetCode
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
algorithms
/
leetCode
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
inc
inc
001_TwoSum.cpp
001_TwoSum.cpp
001_Two_Sum.cpp
001_Two_Sum.cpp
002_AddTwoNumbers.cpp
002_AddTwoNumbers.cpp
002_Add_Two_Numbers.cpp
002_Add_Two_Numbers.cpp
002_Add_Two_Numbers_template.cpp
002_Add_Two_Numbers_template.cpp
003_LongestSubstringWithoutRepeatingCharacters.cpp
003_LongestSubstringWithoutRepeatingCharacters.cpp
003_Longest_Substring_Without_Repeating_Characters.cpp
003_Longest_Substring_Without_Repeating_Characters.cpp
004_MedianOfTwoSortedArrays.cpp
004_MedianOfTwoSortedArrays.cpp
004_Median_of_Two_Sorted_Arrays (2).cpp
004_Median_of_Two_Sorted_Arrays (2).cpp
004_Median_of_Two_Sorted_Arrays.cpp
004_Median_of_Two_Sorted_Arrays.cpp
004_Median_of_Two_Sorted_Arrays_template.cpp
004_Median_of_Two_Sorted_Arrays_template.cpp
005_LongestPalindromicSubstring.cpp
005_LongestPalindromicSubstring.cpp
005_Longest_Palindromic_Substring.cpp
005_Longest_Palindromic_Substring.cpp
005_Longest_Palindromic_Substring_template.cpp
005_Longest_Palindromic_Substring_template.cpp
005_Longest_Palindromic_Substring_template_1.cpp
005_Longest_Palindromic_Substring_template_1.cpp
008_String_to_Integer_(atoi).cpp
008_String_to_Integer_(atoi).cpp
008_String_to_Integer_(atoi)_template.cpp
008_String_to_Integer_(atoi)_template.cpp
010_Regular_Expression_Matching.cpp
010_Regular_Expression_Matching.cpp
015_3Sum (2).cpp
015_3Sum (2).cpp
015_3Sum.cpp
015_3Sum.cpp
015_3Sum_template.cpp
015_3Sum_template.cpp
016_3Sum_Closest.cpp
016_3Sum_Closest.cpp
016_3Sum_Closest_template.cpp
016_3Sum_Closest_template.cpp
017_Letter_Combinations_of_a_Phone_Number.cpp
017_Letter_Combinations_of_a_Phone_Number.cpp
018_4Sum (2).cpp
018_4Sum (2).cpp
018_4Sum.cpp
018_4Sum.cpp
018_4Sum_template.cpp
018_4Sum_template.cpp
018_4Sum_template_1.cpp
018_4Sum_template_1.cpp
019_Remove_Nth_Node_From_End_of_List.cpp
019_Remove_Nth_Node_From_End_of_List.cpp
019_Remove_Nth_Node_From_End_of_List_template.cpp
019_Remove_Nth_Node_From_End_of_List_template.cpp
020_Valid_Parentheses.cpp
020_Valid_Parentheses.cpp
020_Valid_Parentheses_template.cpp
020_Valid_Parentheses_template.cpp
021_Merge_Two_Sorted_Lists.cpp
021_Merge_Two_Sorted_Lists.cpp
021_Merge_Two_Sorted_Lists_template.cpp
021_Merge_Two_Sorted_Lists_template.cpp
023_Merge_k_Sorted_Lists.cpp
023_Merge_k_Sorted_Lists.cpp
024_Swap_Nodes_in_Pairs.cpp
024_Swap_Nodes_in_Pairs.cpp
024_Swap_Nodes_in_Pairs_template.cpp
024_Swap_Nodes_in_Pairs_template.cpp
025_Reverse_Nodes_in_k-Group.cpp
025_Reverse_Nodes_in_k-Group.cpp
025_Reverse_Nodes_in_k-Group_template.cpp
025_Reverse_Nodes_in_k-Group_template.cpp
025_Reverse_Nodes_in_k-Group_template_1.cpp
025_Reverse_Nodes_in_k-Group_template_1.cpp
027_Remove_Element.cpp
027_Remove_Element.cpp
027_Remove_Element_template.cpp
027_Remove_Element_template.cpp
028_Implement_strStr().cpp
028_Implement_strStr().cpp
028_Implement_strStr()_template.cpp
028_Implement_strStr()_template.cpp
031_Next_Permutation.cpp
031_Next_Permutation.cpp
031_Next_Permutation_template.cpp
031_Next_Permutation_template.cpp
032_Longest_Valid_Parentheses.cpp
032_Longest_Valid_Parentheses.cpp
032_Longest_Valid_Parentheses_template.cpp
032_Longest_Valid_Parentheses_template.cpp
032_Longest_Valid_Parentheses_template_DP.cpp
032_Longest_Valid_Parentheses_template_DP.cpp
032_Longest_Valid_Parentheses_template_best.cpp
032_Longest_Valid_Parentheses_template_best.cpp
033_Search_in_Rotated_Sorted_Array (2).cpp
033_Search_in_Rotated_Sorted_Array (2).cpp
033_Search_in_Rotated_Sorted_Array.cpp
033_Search_in_Rotated_Sorted_Array.cpp
033_Search_in_Rotated_Sorted_Array_1.cpp
033_Search_in_Rotated_Sorted_Array_1.cpp
033_Search_in_Rotated_Sorted_Array_template.cpp
033_Search_in_Rotated_Sorted_Array_template.cpp
034_Search_for_a_Range.cpp
034_Search_for_a_Range.cpp
035_Search_Insert_Position.cpp
035_Search_Insert_Position.cpp
035_Search_Insert_Position_template.cpp
035_Search_Insert_Position_template.cpp
036_Valid_Sudoku.cpp
036_Valid_Sudoku.cpp
036_Valid_Sudoku_template.cpp
036_Valid_Sudoku_template.cpp
041_First_Missing_Positive.cpp
041_First_Missing_Positive.cpp
042_Trapping_Rain_Water.cpp
042_Trapping_Rain_Water.cpp
042_Trapping_Rain_Water_template.cpp
042_Trapping_Rain_Water_template.cpp
046_Permutations.cpp
046_Permutations.cpp
046_Permutations_ITERATIVE_withoutDuplicate.cpp
046_Permutations_ITERATIVE_withoutDuplicate.cpp
047_Permutations_II.cpp
047_Permutations_II.cpp
048_Rotate_Image.cpp
048_Rotate_Image.cpp
049_Group_Anagrams.cpp
049_Group_Anagrams.cpp
054_Spiral_Matrix.cpp
054_Spiral_Matrix.cpp
059_Spiral_Matrix_II.cpp
059_Spiral_Matrix_II.cpp
060_Permutation_Sequence.cpp
060_Permutation_Sequence.cpp
060_Permutation_Sequence_template.cpp
060_Permutation_Sequence_template.cpp
061_Rotate_List.cpp
061_Rotate_List.cpp
061_Rotate_List_template.cpp
061_Rotate_List_template.cpp
066_Plus_One.cpp
066_Plus_One.cpp
066_Plus_One_template.cpp
066_Plus_One_template.cpp
067_Add_Binary.cpp
067_Add_Binary.cpp
069_Sqrt(x).cpp
069_Sqrt(x).cpp
070_Climbing_Stairs.cpp
070_Climbing_Stairs.cpp
070_Climbing_Stairs_template.cpp
070_Climbing_Stairs_template.cpp
071_Simplify_Path.cpp
071_Simplify_Path.cpp
073_Set_Matrix_Zeroes.cpp
073_Set_Matrix_Zeroes.cpp
073_Set_Matrix_Zeroes_templata.cpp
073_Set_Matrix_Zeroes_templata.cpp
074_Search_a_2D_Matrix.cpp
074_Search_a_2D_Matrix.cpp
074_Search_a_2D_Matrix_BSEARCH.cpp
074_Search_a_2D_Matrix_BSEARCH.cpp
075_Sort_Colors.cpp
075_Sort_Colors.cpp
078_Subsets.cpp
078_Subsets.cpp
078_Subsets_BITMANIPULATION.cpp
078_Subsets_BITMANIPULATION.cpp
079_Word_Search.cpp
079_Word_Search.cpp
081_Search_in_Rotated_Sorted_Array_II.cpp
081_Search_in_Rotated_Sorted_Array_II.cpp
081_Search_in_Rotated_Sorted_Array_II_template.cpp
081_Search_in_Rotated_Sorted_Array_II_template.cpp
082_Remove_Duplicates_from_Sorted_List_II.cpp
082_Remove_Duplicates_from_Sorted_List_II.cpp
082_Remove_Duplicates_from_Sorted_List_II_template.cpp
082_Remove_Duplicates_from_Sorted_List_II_template.cpp
082_Remove_Duplicates_from_Sorted_List_II_template_1.cpp
082_Remove_Duplicates_from_Sorted_List_II_template_1.cpp
083_Remove_Duplicates_from_Sorted_List.cpp
083_Remove_Duplicates_from_Sorted_List.cpp
083_Remove_Duplicates_from_Sorted_List_template.cpp
083_Remove_Duplicates_from_Sorted_List_template.cpp
084_Largest_Rectangle_in_Histogram.cpp
084_Largest_Rectangle_in_Histogram.cpp
086_Partition_List.cpp
086_Partition_List.cpp
086_Partition_List_template.cpp
086_Partition_List_template.cpp
088_Merge_Sorted_Array.cpp
088_Merge_Sorted_Array.cpp
View all files
You can’t perform that action at this time.