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 }}
shichao-an
leetcode-python
Repository navigation
Code
Issues
Pull requests
4
(4)
Actions
Projects
Wiki
Security and quality
Insights
More
items
leetcode-python
Public
Notifications
You must be signed in to change notification settings
Fork
225
(
225
)
Star
497
(
497
)
You must be signed in to star a repository
About
LeetCode problems in Python
Resources
Readme
BSD-2-Clause license
Activity
Stars
497
stars
Watchers
52
watching
Forks
225
forks
Report repository
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
226 Commits
226 Commits
Folders and files
Name
Name
Last commit message
Last commit date
3sum
3sum
3sum_closest
3sum_closest
4sum
4sum
add_binary
add_binary
add_digits
add_digits
add_two_numbers
add_two_numbers
anagrams
anagrams
balanced_binary_tree
balanced_binary_tree
best_time_to_buy_and_sell_stock
best_time_to_buy_and_sell_stock
best_time_to_buy_and_sell_stock_ii
best_time_to_buy_and_sell_stock_ii
best_time_to_buy_and_sell_stock_iii
best_time_to_buy_and_sell_stock_iii
binary_search_tree_iterator
binary_search_tree_iterator
binary_tree_inorder_traversal
binary_tree_inorder_traversal
binary_tree_level_order_traversal
binary_tree_level_order_traversal
binary_tree_level_order_traversal_ii
binary_tree_level_order_traversal_ii
binary_tree_maximum_path_sum
binary_tree_maximum_path_sum
binary_tree_paths
binary_tree_paths
binary_tree_postorder_traversal
binary_tree_postorder_traversal
binary_tree_preorder_traversal
binary_tree_preorder_traversal
binary_tree_zigzag_level_order_traversal
binary_tree_zigzag_level_order_traversal
bitwise_and_of_numbers_range
bitwise_and_of_numbers_range
climbing_stairs
climbing_stairs
clone_graph
clone_graph
combination_sum
combination_sum
combination_sum_ii
combination_sum_ii
combinations
combinations
construct_binary_tree_from_inorder_and_postorder_traversal
construct_binary_tree_from_inorder_and_postorder_traversal
construct_binary_tree_from_preorder_and_inorder_traversal
construct_binary_tree_from_preorder_and_inorder_traversal
container_with_most_water
container_with_most_water
contains_duplicate
contains_duplicate
contains_duplicate_ii
contains_duplicate_ii
convert_sorted_array_to_binary_search_tree
convert_sorted_array_to_binary_search_tree
convert_sorted_list_to_binary_search_tree
convert_sorted_list_to_binary_search_tree
copy_list_with_random_pointer
copy_list_with_random_pointer
count_and_say
count_and_say
count_primes
count_primes
course_schedule
course_schedule
delete_node_in_a_linked_list
delete_node_in_a_linked_list
different_ways_to_add_parentheses
different_ways_to_add_parentheses
distinct_subsequences
distinct_subsequences
edit_distance
edit_distance
excel_sheet_column_number
excel_sheet_column_number
factorial_trailing_zeroes
factorial_trailing_zeroes
find_minimum_in_rotated_sorted_array
find_minimum_in_rotated_sorted_array
find_minimum_in_rotated_sorted_array_ii
find_minimum_in_rotated_sorted_array_ii
find_peak_element
find_peak_element
first_bad_version
first_bad_version
first_missing_positive
first_missing_positive
flatten_binary_tree_to_linked_list
flatten_binary_tree_to_linked_list
gas_station
gas_station
generate_parentheses
generate_parentheses
gray_code
gray_code
group_anagrams
group_anagrams
h_index
h_index
happy_number
happy_number
house_robber
house_robber
house_robber_ii
house_robber_ii
implement_queue_using_stacks
implement_queue_using_stacks
implement_stack_using_queues
implement_stack_using_queues
implement_strstr
implement_strstr
insertion_sort_list
insertion_sort_list
invert_binary_tree
invert_binary_tree
isomorphic_strings
isomorphic_strings
jump_game
jump_game
jump_game_ii
jump_game_ii
kth_largest_element_in_an_array
kth_largest_element_in_an_array
largest_rectangle_in_histogram
largest_rectangle_in_histogram
length_of_last_word
length_of_last_word
letter_combinations_of_a_phone_number
letter_combinations_of_a_phone_number
linked_list_cycle
linked_list_cycle
linked_list_cycle_ii
linked_list_cycle_ii
longest_common_prefix
longest_common_prefix
longest_consecutive_sequence
longest_consecutive_sequence
longest_palindromic_substring
longest_palindromic_substring
longest_substring_without_repeating_characters
longest_substring_without_repeating_characters
lowest_common_ancestor_of_a_binary_search_tree
lowest_common_ancestor_of_a_binary_search_tree
lowest_common_ancestor_of_a_binary_tree
lowest_common_ancestor_of_a_binary_tree
lru_cache
lru_cache
majority_element
majority_element
majority_element_ii
majority_element_ii
maximal_rectangle
maximal_rectangle
maximum_depth_of_binary_tree
maximum_depth_of_binary_tree
maximum_subarray
maximum_subarray
merge_intervals
merge_intervals
merge_k_sorted_lists
merge_k_sorted_lists
merge_sorted_array
merge_sorted_array
merge_two_sorted_lists
merge_two_sorted_lists
minimum_depth_of_binary_tree
minimum_depth_of_binary_tree
minimum_path_sum
minimum_path_sum
minimum_window_substring
minimum_window_substring
missing_number
missing_number
move_zeroes
move_zeroes
multiply_strings
multiply_strings
n-queens
n-queens
n-queens_ii
n-queens_ii
next_permutation
next_permutation
number_of_1_bits
number_of_1_bits
number_of_islands
number_of_islands
palindrome_linked_list
palindrome_linked_list
palindrome_number
palindrome_number
View all files
Repository files navigation
README
BSD-2-Clause license
More
items
LeetCode Python =============== LeetCode problems solved in Python
About
LeetCode problems in Python
Resources
Readme
BSD-2-Clause license
Activity
Stars
497
stars
Watchers
52
watching
Forks
225
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.