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
Type
/
to 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 }}
sagasu
/
python-algorithms
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
master
Breadcrumbs
python-algorithms
/
leetcode
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
python-algorithms
/
leetcode
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
Angle Between Hands of a Clock
Angle Between Hands of a Clock
Delete the Middle Node of a Linked List
Delete the Middle Node of a Linked List
Find the Highest Altitude
Find the Highest Altitude
Maximum Building Height
Maximum Building Height
Maximum Ice Cream Bars
Maximum Ice Cream Bars
Maximum Twin Sum of a Linked List
Maximum Twin Sum of a Linked List
Number of Ways to Assign Edge Weights II
Number of Ways to Assign Edge Weights II
Number of Ways to Assign Edge WeightsI
Number of Ways to Assign Edge WeightsI
Process String with Special Operations I
Process String with Special Operations I
Process String with Special Operations II
Process String with Special Operations II
Shift Distance Between Two Strings
Shift Distance Between Two Strings
Weighted Word Mapping
Weighted Word Mapping
add_binary
add_binary
add_digits
add_digits
add_two_numbers
add_two_numbers
advantage_shuffle
advantage_shuffle
all_elements_in_two_binary_search_trees
all_elements_in_two_binary_search_trees
ambiguous_coordinates
ambiguous_coordinates
arithmetic_slices
arithmetic_slices
arranging_coins
arranging_coins
binary_search_tree
binary_search_tree
binary_tree_cameras
binary_tree_cameras
binary_tree_level_order_traversal
binary_tree_level_order_traversal
binary_tree_right_side_view
binary_tree_right_side_view
binary_trees_with_factors
binary_trees_with_factors
block_placement_queries
block_placement_queries
boats_to_save_people
boats_to_save_people
broken_calculator
broken_calculator
build_an_array_with_stack_operations
build_an_array_with_stack_operations
burst_balloons
burst_balloons
bus_routes
bus_routes
candy
candy
check_if_a_string_contains_all_binary_codes_of_size_k
check_if_a_string_contains_all_binary_codes_of_size_k
check_if_all_1s_are_at_least_length_K_places_away
check_if_all_1s_are_at_least_length_K_places_away
check_if_array_is_good
check_if_array_is_good
check_if_array_is_sorted_and_rotated
check_if_array_is_sorted_and_rotated
check_if_binary_string_has_at_most_one_segment_of_ones
check_if_binary_string_has_at_most_one_segment_of_ones
check_if_strings_can_be_made_equal_with_operations_i
check_if_strings_can_be_made_equal_with_operations_i
check_if_strings_can_be_made_equal_with_operations_ii
check_if_strings_can_be_made_equal_with_operations_ii
check_if_there_is_a_valid_path_in_a_grid
check_if_there_is_a_valid_path_in_a_grid
cherry_pickup_II
cherry_pickup_II
clone_graph
clone_graph
closest_equal_element_queries
closest_equal_element_queries
coin_change
coin_change
combination_sum
combination_sum
compare_version_numbers
compare_version_numbers
complement_of_base_10_Integer
complement_of_base_10_Integer
concatenate_non_zero_digits_and_multiply_by_sum_i
concatenate_non_zero_digits_and_multiply_by_sum_i
concatenate_non_zero_digits_and_multiply_by_sum_ii
concatenate_non_zero_digits_and_multiply_by_sum_ii
constrained_subsequence_sum
constrained_subsequence_sum
construct_binary_tree_from_preorder_and_inorder_traversal
construct_binary_tree_from_preorder_and_inorder_traversal
construct_target_array_with_multiple_sums
construct_target_array_with_multiple_sums
container_with_most_water
container_with_most_water
contiguous_array
contiguous_array
convert_BST_to_treater_tree
convert_BST_to_treater_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_all_valid_pickup_and_delivery_options
count_all_valid_pickup_and_delivery_options
count_nodes_equal_to_average_of_subtree
count_nodes_equal_to_average_of_subtree
count_number_of_homogenous_substrings
count_number_of_homogenous_substrings
count_number_of_special_subsequences
count_number_of_special_subsequences
count_of_smaller_numbers_after_self
count_of_smaller_numbers_after_self
count_submatrices_with_equal_frequency_of_x_and_y
count_submatrices_with_equal_frequency_of_x_and_y
count_submatrices_with_top_left_element_and_sum_less_than_k
count_submatrices_with_top_left_element_and_sum_less_than_k
count_the_number_of_complete_components
count_the_number_of_complete_components
count_the_number_of_special_characters_i
count_the_number_of_special_characters_i
count_the_number_of_special_characters_ii
count_the_number_of_special_characters_ii
count_visited_nodes_in_a_directed_graph
count_visited_nodes_in_a_directed_graph
count_vowels_permutation
count_vowels_permutation
course_Schedule_III
course_Schedule_III
course_schedule_II
course_schedule_II
create_binary_tree_from_descriptions
create_binary_tree_from_descriptions
critical_connections_in_a_network
critical_connections_in_a_network
cyclically_rotating_a_grid
cyclically_rotating_a_grid
decode_string
decode_string
decode_the_slanted_ciphertext
decode_the_slanted_ciphertext
decode_ways_II
decode_ways_II
delete_and_earn
delete_and_earn
delete_operation_for_two_strings
delete_operation_for_two_strings
design_circular_queue
design_circular_queue
design_graph_with_shortest_path_calculator
design_graph_with_shortest_path_calculator
design_underground_system
design_underground_system
destroying_asteroids
destroying_asteroids
detect_cycles_in_2d_grid
detect_cycles_in_2d_grid
determine_if_a_cell_is_reachable_at_a_given_time
determine_if_a_cell_is_reachable_at_a_given_time
determine_if_two_strings_are_close
determine_if_two_strings_are_close
determine_whether_matrix_can_be_obtained_by_rotation
determine_whether_matrix_can_be_obtained_by_rotation
distribute_candies
distribute_candies
earliest_finish_time_for_land_and_water_rides_i
earliest_finish_time_for_land_and_water_rides_i
earliest_finish_time_for_land_and_water_rides_ii
earliest_finish_time_for_land_and_water_rides_ii
edit_distance
edit_distance
eliminate_maximum_number_of_monsters
eliminate_maximum_number_of_monsters
equal_sum_grid_partition_ii
equal_sum_grid_partition_ii
fancy_sequence
fancy_sequence
find-the-maximum-number-of-elements-in-subset
find-the-maximum-number-of-elements-in-subset
find_all_anagrams_in_a_string
find_all_anagrams_in_a_string
find_and_replace_pattern
find_and_replace_pattern
find_k_closest_elements
find_k_closest_elements
find_largest_value_in_each_tree_row
find_largest_value_in_each_tree_row
find_median_from_data_stream
find_median_from_data_stream
View all files
You can’t perform that action at this time.