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
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 }}
1ambd4
/
leetcode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
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
main
Branches
Tags
Go to file
Code
Open more actions menu
Folders and files
Name
Name
Last commit message
Last commit date
Latest commit
History
155 Commits
155 Commits
.editorconfig
.editorconfig
.gitignore
.gitignore
0001.two_sum.cpp
0001.two_sum.cpp
0002.add_two_numbers.cpp
0002.add_two_numbers.cpp
0003.longest_substring_without_repeating_characters.cpp
0003.longest_substring_without_repeating_characters.cpp
0005.longest_palindromic_substring.cpp
0005.longest_palindromic_substring.cpp
0009.palindrome_number.cpp
0009.palindrome_number.cpp
0011.container_with_most_water.cpp
0011.container_with_most_water.cpp
0013.roman_to_integer.cpp
0013.roman_to_integer.cpp
0015.3sum.cpp
0015.3sum.cpp
0017.letter_combinations_of_a_phone_number.cpp
0017.letter_combinations_of_a_phone_number.cpp
0019.remove_nth_node_from_end_of_list.cpp
0019.remove_nth_node_from_end_of_list.cpp
0020.valid_parentheses.cpp
0020.valid_parentheses.cpp
0022.generate_parentheses.cpp
0022.generate_parentheses.cpp
0023.merge_k_sorted_lists.cpp
0023.merge_k_sorted_lists.cpp
0024.swap_nodes_in_pairs.cpp
0024.swap_nodes_in_pairs.cpp
0028.find_the_index_of_the_first_occurrence_in_a_string.cpp
0028.find_the_index_of_the_first_occurrence_in_a_string.cpp
0031.next_permutation.cpp
0031.next_permutation.cpp
0034.find_first_and_last_position_of_element_in_sorted_array.cpp
0034.find_first_and_last_position_of_element_in_sorted_array.cpp
0035.search_insert_position.cpp
0035.search_insert_position.cpp
0039.combination_sum.cpp
0039.combination_sum.cpp
0041.first_missing_positive.cpp
0041.first_missing_positive.cpp
0042.trapping_rain_water.cpp
0042.trapping_rain_water.cpp
0045.jump_game_ii.cpp
0045.jump_game_ii.cpp
0046.permutations.cpp
0046.permutations.cpp
0048.rotate_image.cpp
0048.rotate_image.cpp
0049.group_anagrams.cpp
0049.group_anagrams.cpp
0050.powx_n.cpp
0050.powx_n.cpp
0053.maximum_subarray.cpp
0053.maximum_subarray.cpp
0054.spiral_matrix.cpp
0054.spiral_matrix.cpp
0055.jump_game.cpp
0055.jump_game.cpp
0056.merge_intervals.cpp
0056.merge_intervals.cpp
0057.insert_interval.cpp
0057.insert_interval.cpp
0062.unique_paths.cpp
0062.unique_paths.cpp
0063.unique_paths_ii.cpp
0063.unique_paths_ii.cpp
0064.minimum_path_sum.cpp
0064.minimum_path_sum.cpp
0067.add_binary.cpp
0067.add_binary.cpp
0068.text_justification.cpp
0068.text_justification.cpp
0069.sqrtx.cpp
0069.sqrtx.cpp
0072.edit_distance.cpp
0072.edit_distance.cpp
0073.set_matrix_zeroes.cpp
0073.set_matrix_zeroes.cpp
0075.sort_colors.cpp
0075.sort_colors.cpp
0076.minimum_window_substring.cpp
0076.minimum_window_substring.cpp
0078.subsets.cpp
0078.subsets.cpp
0092.reverse_linked_list_ii.cpp
0092.reverse_linked_list_ii.cpp
0094.binary_tree_inorder_traversal.cpp
0094.binary_tree_inorder_traversal.cpp
0098.validate_binary_search_tree.cpp
0098.validate_binary_search_tree.cpp
0101.symmetric_tree.cpp
0101.symmetric_tree.cpp
0102.binary_tree_level_order_traversal.cpp
0102.binary_tree_level_order_traversal.cpp
0104.maximum_depth_of_binary_tree.cpp
0104.maximum_depth_of_binary_tree.cpp
0108.convert_sorted_array_to_binary_search_tree.cpp
0108.convert_sorted_array_to_binary_search_tree.cpp
0112.path_sum.cpp
0112.path_sum.cpp
0113.path_sum_ii.cpp
0113.path_sum_ii.cpp
0114.flatten_binary_tree_to_linked_list.cpp
0114.flatten_binary_tree_to_linked_list.cpp
0118.pascals_triangle.cpp
0118.pascals_triangle.cpp
0121.best_time_to_buy_and_sell_stock.cpp
0121.best_time_to_buy_and_sell_stock.cpp
0122.best_time_to_buy_and_sell_stock_ii.cpp
0122.best_time_to_buy_and_sell_stock_ii.cpp
0124.binary_tree_maximum_path_sum.cpp
0124.binary_tree_maximum_path_sum.cpp
0128.longest_consecutive_sequence.cpp
0128.longest_consecutive_sequence.cpp
0134.gas_station.cpp
0134.gas_station.cpp
0135.candy.cpp
0135.candy.cpp
0136.single_number.cpp
0136.single_number.cpp
0138.copy_list_with_random_pointer.cpp
0138.copy_list_with_random_pointer.cpp
0139.word_break.cpp
0139.word_break.cpp
0142.linked_list_cycle_ii.cpp
0142.linked_list_cycle_ii.cpp
0152.maximum_product_subarray.cpp
0152.maximum_product_subarray.cpp
0155.min_stack.cpp
0155.min_stack.cpp
0160.intersection_of_two_linked_lists.cpp
0160.intersection_of_two_linked_lists.cpp
0167.two_sum_ii_input_array_is_sorted.cpp
0167.two_sum_ii_input_array_is_sorted.cpp
0169.majority_element.cpp
0169.majority_element.cpp
0198.house_robber.cpp
0198.house_robber.cpp
0199.binary_tree_right_side_view.cpp
0199.binary_tree_right_side_view.cpp
0200.number_of_islands.cpp
0200.number_of_islands.cpp
0207.course_schedule.cpp
0207.course_schedule.cpp
0213.house_robber_ii.cpp
0213.house_robber_ii.cpp
0226.invert_binary_tree.cpp
0226.invert_binary_tree.cpp
0228.summary_ranges.cpp
0228.summary_ranges.cpp
0230.kth_smallest_element_in_a_bst.cpp
0230.kth_smallest_element_in_a_bst.cpp
0236.lowest_common_ancestor_of_a_binary_tree.cpp
0236.lowest_common_ancestor_of_a_binary_tree.cpp
0238.product_of_array_except_self.cpp
0238.product_of_array_except_self.cpp
0239.sliding_window_maximum.cpp
0239.sliding_window_maximum.cpp
0240.search_a_2d_matrix_ii.cpp
0240.search_a_2d_matrix_ii.cpp
0258.add_digits.cpp
0258.add_digits.cpp
0275.h_index_ii.cpp
0275.h_index_ii.cpp
0287.find_the_duplicate_number.cpp
0287.find_the_duplicate_number.cpp
0295.find_median_from_data_stream.cpp
0295.find_median_from_data_stream.cpp
0307.range_sum_query_mutable.cpp
0307.range_sum_query_mutable.cpp
0318.maximum_product_of_word_lengths.cpp
0318.maximum_product_of_word_lengths.cpp
0322.coin_change.cpp
0322.coin_change.cpp
0337.house_robber_iii.cpp
0337.house_robber_iii.cpp
0338.counting_bits.cpp
0338.counting_bits.cpp
0342.power_of_four.cpp
0342.power_of_four.cpp
0345.reverse_vowels_of_a_string.cpp
0345.reverse_vowels_of_a_string.cpp
0347.top_k_frequent_elements.cpp
0347.top_k_frequent_elements.cpp
0367.valid_perfect_square.cpp
0367.valid_perfect_square.cpp
0394.decode_string.cpp
0394.decode_string.cpp
0409.longest_palindrome.cpp
0409.longest_palindrome.cpp
0415.add_strings.cpp
0415.add_strings.cpp
0416.partition_equal_subset_sum.cpp
0416.partition_equal_subset_sum.cpp
0437.path_sum_iii.cpp
0437.path_sum_iii.cpp
View all files
Repository files navigation
README
More
items
leetcode
LeetCode Problems' Solutions
About
LeetCode Problems' Solutions
Resources
Readme
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.