Directories ¶ Show internal Expand all Path Synopsis 0001_two_sum 0002_add_two_numbers 0003_longest_substring_without_repeating_characters 0004_median_of_two_sorted_arrays 0005_longest_palindromic_substring 0006_zigzag_conversion 0007_reverse_integer 0008_string_to_integer_atoi 0009_palindrome_number 0010_regular_expression_matching 0011_container_with_most_water 0012_integer_to_roman 0013_roman_to_integer 0014_longest_common_prefix 0015_3sum 0016_3sum_closest 0017_letter_combinations_of_a_phone_number 0018_4sum 0019_remove_nth_node_from_end_of_list 0020_valid_parentheses 0021_merge_two_sorted_lists 0022_generate_parentheses 0023_merge_k_sorted_lists 0024_swap_nodes_in_pairs 0025_reverse_nodes_in_k_group 0026_remove_duplicates_from_sorted_array 0027_remove_element 0028_implement_strstr 0029_divide_two_integers 0030_substring_with_concatenation_of_all_words 0031_next_permutation 0032_longest_valid_parentheses 0033_search_in_rotated_sorted_array 0034_search_for_a_range 0035_search_insert_position 0036_valid_sudoku 0037_sudoku_solver 0038_count_and_say 0039_combination_sum 0040_combination_sum_ii 0041_first_missing_positive 0042_trapping_rain_water 0043_multiply_strings 0044_wildcard_matching 0045_jump_game_ii 0046_permutations 0047_permutations_ii 0048_rotate_image 0049_group_anagrams 0050_pow_x_n 0051_n_queens 0052_n_queens_ii 0053_maximum_subarray 0054_spiral_matrix 0055_jump_game 0056_merge_intervals 0057_insert_interval 0058_length_of_last_word 0059_spiral_matrix_ii 0060_permutation_sequence 0061_rotate_list 0062_unique_paths 0063_unique_paths_ii 0064_minimum_path_sum 0065_valid_number 0066_plus_one 0067_add_binary 0068_text_justification 0069_sqrt_x 0070_climbing_stairs 0071_simplify_path 0072_edit_distance 0073_set_matrix_zeroes 0074_search_a_2d_matrix 0075_sort_colors 0076_minimum_window_substring 0077_combinations 0078_subsets 0079_word_search 0080_remove_duplicates_from_sorted_array_ii 0081_search_in_rotated_sorted_array_ii 0082_remove_duplicates_from_sorted_list_ii 0083_remove_duplicates_from_sorted_list 0084_largest_rectangle_in_histogram 0085_maximal_rectangle 0086_partition_list 0087_scramble_string 0088_merge_sorted_array 0089_gray_code 0090_subsets_ii 0091_decode_ways 0092_reverse_linked_list_ii 0093_restore_ip_addresses 0094_binary_tree_inorder_traversal 0095_unique_binary_search_trees_ii 0096_unique_binary_search_trees 0097_interleaving_string 0098_validate_binary_search_tree 0099_recover_binary_search_tree 0100_same_tree 0101_symmetric_tree 0102_binary_tree_level_order_traversal 0103_binary_tree_zigzag_level_order_traversal 0104_maximum_depth_of_binary_tree 0105_construct_binary_tree_from_preorder_and_inorder_traversal 0106_construct_binary_tree_from_inorder_and_postorder_traversal 0107_binary_tree_level_order_traversal_ii 0108_convert_sorted_array_to_binary_search_tree 0109_convert_sorted_list_to_binary_search_tree 0110_balanced_binary_tree 0111_minimum_depth_of_binary_tree 0112_path_sum 0113_path_sum_ii 0114_flatten_binary_tree_to_linked_list 0115_distinct_subsequences 0118_pascals_triangle 0119_pascals_triangle_ii 0120_triangle 0121_best_time_to_buy_and_sell_stock 0122_best_time_to_buy_and_sell_stock_ii 0123_best_time_to_buy_and_sell_stock_iii 0124_binary_tree_maximum_path_sum 0125_valid_palindrome 0126_word_ladder_ii 0127_word_ladder 0128_longest_consecutive_sequence 0129_sum_root_to_leaf_numbers 0130_surrounded_regious 0131_palindrome_partitioning 0132_palindrome_partitioning_ii 0134_gas_station 0135_candy 0136_single_number 0137_single_number_ii 0139_word_break 0140_word_break_ii 0143_reorder_list 0144_binary_tree_preorder_traversal 0145_binary_tree_postorder_traversal 0146_lru_cache 0147_insertion_sort_list 0148_sort_list 0149_max_points_on_a_line 0150_evaluate_reverse_polish_notation 0152_maximum_product_subarray 0153_find_minimum_in_rotated_sorted_array 0154_find_minimum_in_rotated_sorted_array_ii 0155_min_stack 0162_find_peak_element 0164_maximum_gap 0165_compare_version_numbers 0166_fraction_to_recurring_decimal 0167_two_sum_ii_input_array_is_sorted 0168_excel_sheet_column_title 0169_majority_element 0171_excel_sheet_column_number 0172_factorial_trailing_zeroes 0174_dungeon_game 0179_largest_number 0187_repeated_dna_sequences 0188_best_time_to_buy_and_sell_stock_iv 0189_rotate_array 0198_house_robber 0199_binary_tree_right_side_view 0200_number_of_islands 0201_bitwise_and_of_numbers_range 0202_happy_number 0203_remove_linked_list_elements 0204_count_primes 0205_isomorphic_strings 0206_reverse_linked_list 0207_course_schedule 0208_implement_trie_prefix_tree 0209_minimum_size_subarray_sum 0210_course_schedule_ii 0211_add_and_search_word_data_structure_design 0212_word_search_ii 0213_house_robber_ii 0214_shortest_palindrome 0215_kth_largest_element_in_an_array 0216_combination_sum_iii 0217_contains_duplicate 0218_the_skyline_problem 0219_contains_duplicate_ii 0220_contains_duplicate_iii 0221_maximal_square 0223_rectangle_area 0224_basic_calculator 0225_implement_stack_using_queues 0226_invert_binary_tree 0227_basic_calculator_ii 0228_summary_ranges 0229_majority_element_ii 0230_kth_smallest_element_in_a_bst 0231_power_of_two 0232_implement_queue_using_stacks 0233_number_of_digit_one 0234_palindrome_linked_list 0238_product_of_array_except_self 0239_sliding_window_maximum 0240_search_a_2d_matrix_ii 0241_different_ways_to_add_parentheses 0242_valid_anagram 0257_binary_tree_paths 0258_add_digits 0260_single_number_iii 0263_ugly_number 0264_ugly_number_ii 0268_missing_number 0273_integer_to_english_words 0274_h_index 0275_h_index_ii 0279_perfect_squares 0282_expression_add_operators 0283_move_zeroes 0287_find_the_duplicate_number 0289_game_of_life 0290_word_pattern 0292_nim_game 0295_find_median_from_data_stream 0299_bulls_and_cows 0300_longest_increasing_subsequence 0301_remove_invalid_parentheses 0303_range_sum_query_immutablerange_sum_query_immutable 0304_range_sum_query_2d_immutable 0306_additive_number 0307_range_sum_query_mutable 0309_best_time_to_buy_and_sell_stock_with_cooldown 0310_minimum_height_trees 0312_burst_balloons 0313_super_ugly_number 0315_count_of_smaller_numbers_after_self 0316_remove_duplicate_letters 0318_maximum_product_of_word_lengths 0319_bulb_switcher 0321_create_maximum_number 0322_coin_change 0324_wiggle_sort_ii 0326_power_of_three 0327_count_of_range_sum 0328_odd_even_linked_list 0329_longest_increasing_path_in_a_matrix 0330_patching_array 0331_verify_preorder_serialization_of_a_binary_tree 0332_reconstruct_itinerary 0334_increasing_triplet_subsequence 0335_self_crossing 0336_palindrome_pairs 0337_house_robber_iii 0338_counting_bits 0342_power_of_four 0343_integer_break 0344_reverse_string 0345_reverse_vowels_of_a_string 0347_top_k_frequent_elements 0349_intersection_of_two_arrays 0350_intersection_of_two_arrays_ii 0352_data_stream_as_disjoint_intervals 0354_russian_doll_envelopes 0355_design_twitter 0357_count_numbers_with_unique_digits 0363_max_sum_of_rectangle_no_larger_than_k 0365_water_and_jug_problem 0367_valid_perfect_square 0368_largest_divisible_subset 0371_sum_of_two_integers 0372_super_pow 0373_find_k_pairs_with_smallest_sums 0375_guess_number_higher_or_lower_ii 0376_wiggle_subsequence 0377_combination_sum_iv 0378_kth_smallest_element_in_a_sorted_matrix 0380_insert_delete_getrandom_o1 0381_insert_delete_getrandom_o1_duplicates_allowed 0382_linked_list_random_node 0383_ransom_note 0384_shuffle_an_array 0385_mini_parser 0387_first_unique_character_in_a_string 0388_longest_absolute_file_path 0389_find_the_difference 0390_elimination_game 0391_perfect_rectangle 0392_is_subsequence 0393_utf_8_validation 0394_decode_string 0395_longest_substring_with_at_least_k_repeating_characters 0396_rotate_function 0397_integer_replacement 0398_random_pick_index 0399_evaluate_division 0400_nth_digit 0401_binary_watch 0402_remove_k_digits 0403_frog_jump 0404_sum_of_left_leaves 0405_convert_a_number_to_hexadecimal 0406_queue_reconstruction_by_height 0407_trapping_rain_water_ii 0409_longest_palindrome 0410_split_array_largest_sum 0412_fizz_buzz 0413_arithmetic_slices 0414_third_maximum_number 0415_add_strings 0416_partition_equal_subset_sum 0417_pacific_atlantic_water_flow 0419_battleships_in_a_board 0420_strong_password_checker 0421_maximum_xor_of_two_numbers_in_an_array 0423_reconstruct_original_digits_from_english 0424_longest_repeating_character_replacement 0432_all_oone_data_structure 0433_minimum_genetic_mutation 0434_number_of_segments_in_a_string 0435_non_overlapping_intervals 0436_find_right_interval 0437_path_sum_iii 0438_find_all_anagrams_in_a_string 0440_k_th_smallest_in_lexicographical_order 0441_arranging_coins 0442_find_all_duplicates_in_an_array 0443_string_compression 0445_add_two_numbers_ii 0446_arithmetic_slices_ii_subsequence 0447_number_of_boomerangs 0448_find_all_numbers_disappeared_in_an_array 0450_delete_node_in_a_bst 0451_sort_characters_by_frequency 0452_minimum_number_of_arrows_to_burst_balloons 0453_minimum_moves_to_equal_array_elements 0454_4sum_ii 0455_assign_cookies 0456_132_pattern 0457_circular_array_loop 0458_poor_pigs 0459_repeated_substring_pattern 0460_lfu_cache 0461_hamming_distance 0462_minimum_moves_to_equal_array_elements_ii 0463_island_perimeter 0464_can_i_win 0466_count_the_repetitions 0467_unique_substrings_in_wraparound_string 0468_validate_ip_address 0470_implement_rand10_using_rand7 0472_concatenated_words 0473_matchsticks_to_square 0474_ones_and_zeroes 0475_heaters 0476_number_complement 0477_total_hamming_distance 0478_generate_random_point_in_a_circle 0479_largest_palindrome_product 0480_sliding_window_media 0481_magical_string 0482_license_key_formatting 0483_smallest_good_base 0485_max_consecutive_ones 0486_predict_the_winner 0488_zuma_game 0491_increasing_subsequences 0492_construct_the_rectangle 0493_reverse_pairs 0494_target_sum 0495_teemo_attacking 0496_next_greater_element_i 0497_random_point_in_non_overlapping_rectangles 0498_diagonal_traverse 0500_keyboard_row 0501_find_mode_in_binary_search_tree 0502_ipo 0503_next_greater_element_ii 0504_base_7 0506_relative_ranks 0507_perfect_number 0508_most_frequent_subtree_sum 0513_find_bottom_left_tree_value 0514_freedom_trail 0515_find_largest_value_in_each_tree_row 0516_longest_palindromic_subsequence 0517_super_washing_machines 0518_coin_change_2 0519_random_flip_matrix 0520_detect_capital 0521_longest_uncommon_subsequence_i 0522_longest_uncommon_subsequence_ii 0523_continuous_subarray_sum 0524_longest_word_in_dictionary_through_deleting 0525_contiguous_array 0526_beautiful_arrangement 0528_random_pick_with_weight 0529_minesweeper 0530_minimum_absolute_difference_in_bst 0532_k_diff_pairs_in_an_array 0537_complex_number_multiplication 0538_convert_bst_to_greater_tree 0539_minimum_time_difference 0540_single_element_in_a_sorted_array 0541_reverse_string_ii 0542_01_matrix 0543_diameter_of_binary_tree 0546_remove_boxes 0547_friend_circles 0551_student_attendance_record_i 0552_student_attendance_record_ii 0553_optimal_division 0554_brick_wall 0556_next_greater_element_iii 0557_reverse_words_in_a_string_iii 0560_subarray_sum_equals_k 0561_array_partition_i 0563_binary_tree_tilt 0564_find_the_closest_palindrome 0565_array_nesting 0566_reshape_the_matrix 0567_permutation_in_string 0572_subtree_of_another_tree 0575_distribute_candies 0576_out_of_boundary_paths 0581_shortest_unsorted_continuous_subarray 0583_delete_operation_for_two_strings 0587_erect_the_fence 0591_tag_validator 0592_fraction_addition_and_subtraction 0593_valid_square 0594_longest_harmonious_subsequence 0598_range_addition_ii 0599_minimum_index_sum_of_two_lists 0600_non_negative_integers_without_consecutive_ones 0605_can_place_flowers 0606_construct_string_from_binary_tree 0609_find_duplicate_file_in_system 0611_valid_triangle_number 0617_merge_two_binary_trees 0621_task_scheduler 0622_design_circular_queue 0623_add_one_row_to_tree 0628_maximum_product_of_three_numbers 0629_k_inverse_pairs_array 0630_course_schedule_iii 0632_smallest_range 0633_sum_of_square_numbers 0636_exclusive_time_of_functions 0637_average_of_levels_in_binary_tree 0638_shopping_offers 0639_decode_ways_ii 0640_solve_the_equation 0641_design_circular_deque 0643_maximum_average_subarray_i 0645_set_mismatch 0646_maximum_length_of_pair_chain 0647_palindromic_substrings 0648_replace_words 0649_dota2_senate 0650_2_keys_keyboard 0652_find_duplicate_subtrees 0653_two_sum_iv_input_is_a_bst 0654_maximum_binary_tree 0655_print_binary_tree 0657_judge_route_circle 0658_find_k_closest_elements 0659_split_array_into_consecutive_subsequences 0661_image_smoother 0662_maximum_width_of_binary_tree 0664_strange_printer 0665_non_decreasing_array 0667_beautiful_arrangement_ii 0668_kth_smallest_number_in_multiplication_table 0669_trim_a_binary_search_tree 0670_maximum_swap 0671_second_minimum_node_in_a_binary_tree 0672_bulb_switcher_ii 0673_number_of_longest_increasing_subsequence 0674_longest_continuous_increasing_subsequence 0675_cut_off_trees_for_golf_event 0676_implement_magic_dictionary 0677_map_sum_pairs 0678_valid_parenthesis_string 0679_24_game 0680_valid_palindrome_ii 0682_baseball_game 0684_redundant_connection 0685_redundant_connection_ii 0686_repeated_string_match 0687_longest_univalue_path 0688_knight_probability_in_chessboard 0689_maximum_sum_of_3_non_overlapping_subarrays 0691_stickers_to_spell_word 0692_top_k_frequent_words 0693_binary_number_with_alternating_bits 0695_max_area_of_island 0696_count_binary_substrings 0697_degree_of_an_array 0698_partition_to_k_equal_sum_subsets 0699_falling_squares 0700_search_in_a_binary_search_tree 0701_insert_into_a_binary_search_tree 0703_kth_largest_element_in_a_stream 0704_binary_search 0705_design_hashset 0706_design_hashmap 0707_design_linked_list 0709_to_lower_case 0710_random_pick_with_blacklist 0712_minimum_ascii_delete_sum_for_two_strings 0713_subarray_product_less_than_k 0714_best_time_to_buy_and_sell_stock_with_transaction_fee 0715_range_module 0717_1_bit_and_2_bit_characters 0718_maximum_length_of_repeated_subarray 0719_find_k_th_smallest_pair_distance 0720_longest_word_in_dictionary 0721_accounts_merge 0722_remove_comments 0724_find_pivot_index 0725_split_linked_list_in_parts 0726_number_of_atoms 0728_self_dividing_numbers 0729_my_calendar_i 0730_count_different_palindromic_subsequences 0731_my_calendar_ii 0732_my_calendar_iii 0733_flood_fill 0735_asteroid_collision 0736_parse_lisp_expression 0738_monotone_increasing_digits 0739_daily_temperatures 0740_delete_and_earn 0741_cherry_pickup 0743_network_delay_time 0744_find_smallest_letter_greater_than_target 0745_prefix_and_suffix_search 0746_min_cost_climbing_stairs 0747_largest_number_at_least_twice_of_others 0748_shortest_completing_word 0749_contain_virus 0752_open_the_lock 0753_cracking_the_safe 0754_reach_a_number 0756_pyramid_transition_matrix 0757_set_intersection_size_at_least_two 0761_special_binary_string 0762_prime-number_of_set_bits_in_binary_representation 0763_partition_labels 0764_largest_plus_sign 0765_couples_holding_hands 0766_toeplitz_matrix 0767_reorganize_string 0768_max_chunks_to_make_sorted_ii 0769_max_chunks_to_make_sorted 0770_basic_calculator_iv 0771_jewels_and_stones 0773_sliding_puzzle 0775_global_and_local_inversions 0777_swap_adjacent_in_lr_string 0778_swim_in_rising_water 0779_k_th_symbol_in_grammar 0780_reaching_points 0781_rabbits_in_forest 0782_transform_to_chessboard 0783_minimum_distance_between_bst_nodes 0784_letter_case_permutation 0785_is_graph_bipartite 0786_k_th_smallest_prime_fraction 0787_cheapest_flights_within_k_stops 0788_rotated_digits 0789_escape_the_ghosts 0790_domino_and_tromino_tiling 0791_custom-sort_string 0792_number_of_matching_subsequences 0793_preimage_size_of_factorial_zeroes_function 0794_valid_tic_tac_toe_state 0795_number_of_subarrays_with_bounded_maximum 0796_rotate_string 0797_all_paths_from_source_to_target 0798_smallest_rotation_with_highest_score 0799_champagne_tower 0801_minimum_swaps_to_make_sequences_increasing 0802_find_eventual_safe_states 0803_bricks_falling_when_hit 0804_unique_morse_code_words 0805_split_array_with_same_average 0806_number_of_lines_to_write_string 0807_max_increase_to_keep_city_skyline 0808_soup_servings 0809_expressive_words 0810_chalkboard_xor_game 0811_subdomain_visit_count 0812_largest_triangle_area 0813_largest_sum_of_averages 0814_binary_tree_pruning 0815_bus_routes 0816_ambiguous_coordinates 0817_linked_list_components 0818_race_car 0819_most_common_word 0820_short_encoding_of_words 0821_shortest_distance_to_a_character 0822_card_flipping_game 0823_binary_trees_with_factors 0824_goat_latin 0825_friends_of_appropriate_ages 0826_most_profit_assigning_work 0827_making_a_large_island 0828_unique_letter_string 0829_consecutive_numbers_sum 0830_positions_of_large_groups 0831_masking_personal_information 0832_flipping_an_image 0833_find_and_replace_in_string 0834_sum_of_distances_in_tree 0835_image_overlap 0836_rectangle_overlap 0837_new_21_game 0838_push_dominoes 0839_similar_string_groups 0840_magic_squares_in_grid 0841_keys_and_rooms 0842_split_array_into_fibonacci_sequence 0843_guess_the_word 0844_backspace_string_compare 0845_longest_mountain_in_array 0846_hand_of_straights 0847_shortest_path_visiting_all_nodes 0848_shifting_letters 0849_maximize_distance_to_closest_person 0850_rectangle_area_ii 0851_loud_and_rich 0852_peak_index_in_a_mountain_array 0853_car_fleet 0854_k_similar_strings 0855_exam_room 0856_score_of_parentheses 0857_minimum_cost_to_hire_k_workers 0858_mirror_reflection 0859_buddy_strings 0860_lemonade_change 0861_score_after_flipping_matrix 0862_shortest_subarray_with_sum_at_least_k 0863_all_nodes_distance_k_in_binary_tree 0864_shortest_path_to_get_all_keys 0865_smallest_subtree_with_all_the_deepest_nodes 0866_prime_palindrome 0867_transpose_matrix 0868_binary_gap 0869_reordered_power_of_2 0870_advantage_shuffle 0871_minimum_number_of_refueling_stops 0872_leaf_similar_trees 0873_length_of_longest_fibonacci_subsequence 0874_walking_robot_simulation 0875_koko_eating_bananas 0876_middle_of_the_linked_list 0877_stone_game 0878_nth_magical_number 0879_profitable_schemes 0880_decoded_string_at_index 0881_boats_to_save_people 0882_reachable_nodes_in_subdivided_graph 0883_projection_area_of_3d_shapes 0884_uncommon_words_from_two_sentences 0885_spiral_matrix_iii 0886_possible_bipartition 0887_super_egg_drop 0888_fair_candy_swap 0889_construct_binary_tree_from_preorder_and_postorder_traversal 0890_find_and_replace_pattern 0891_sum_of_subsequence_widths 0892_surface_area_of_3d_shapes 0893_groups_of_special_equivalent_strings 0894_all_possible_full_binary_trees 0895_maximum_frequency_stack 0896_monotonic_array 0897_increasing_order_search_tree 0898_bitwise_ors_of_subarrays 0899_orderly_queue 0900_rle_iterator 0901_online_stock_span 0902_numbers_at_most_n_given_digit_set 0903_valid_permutations_for_di_sequence 0904_fruit_into_baskets 0905_sort_array_by_parity 0906_super_palindromes 0907_sum_of_subarray_minimums 0908_smallest_range_i 0909_snakes_and_ladders 0910_smallest_range_ii 0911_online_election 0913_cat_and_mouse 0914_x_of_a_kind_in_a_deck_of_cards 0915_partition_array_into_disjoint_intervals 0916_word_subsets 0917_reverse_only_letters 0918_maximum_sum_circular_subarray 0919_complete_binary_tree_inserter 0920_number_of_music_playlists 0921_minimum_add_to_make_parentheses_valid 0922_sort_array_by_parity_ii 0923_3sum_with_multiplicity 0924_minimize_malware_spread 0925_long_pressed_name 0926_flip_string_to_monotone_increasing 0927_three_equal_parts 0929_unique_email_addresses 0930_binary_subarrays_with_sum 0931_minimum_falling_path_sum 0932_beautiful_array 0933_number_of_recent_calls 0934_shortest_bridge 0935_knight_dialer 0936_stamping_the_sequence 0937_reorder_log_files 0938_range_sum_of_bst 0939_minimum_area_rectangle 0940_distinct_subsequences_ii 0941_valid_mountain_array 0942_di_string_match 0943_find_the_shortest_superstring 0944_delete_columns_to_make_sorted 0945_minimum_increment_to_make_array_unique 0946_validate_stack_sequences 0947_most_stones_removed_with_same_row_or_column 0948_bag_of_tokens 0949_largest_time_for_given_digits 0950_reveal_cards_in_increasing_order 0951_flip_equivalent_binary_trees 0952_largest_component_size_by_common_factor 0953_verifying_an_alien_dictionary 0954_array_of_doubled_pairs 0955_delete_columns_to_make_sorted_ii 0956_tallest_billboard 0957_prison_cells_after_n_days 0958_check_completeness_of_a_binary_tree 0959_regions_cut_by_slashes 0960_delete_columns_to_make_sorted_iii 0961_n_repeated_element_in_size_2n_array 0962_maximum_width_ramp 0963_minimum_area_rectangle_ii 0964_least_operators_to_express_number 0965_univalued_binary_tree 0966_vowel_spellchecker 0967_numbers_with_same_consecutive_differences 0968_binary_tree_cameras 0969_pancake_sorting 0970_powerful_integers 0971_flip_binary_tree_to_match_preorder_traversal 0972_equal_rational_numbers 0973_k_closest_points_to_origin 0974_subarray_sums_divisible_by_k Click to show internal directories. Click to hide internal directories.