Directories ¶ Show internal Expand all Path Synopsis 1002_find_common_characters 1009_complement_of_base_10_integer 100_same_tree 1026_maximum_difference_between_node_and_ancestor 1038_binary_search_tree_to_greater_sum_tree 1043_partition_array_for_maximum_sum 1046_last_stone_weight 1048_longest_string_chain 1051_height_checker 1052_grumpy_bookstore_owner 1072_flip_columns_for_maximum_number_of_equal_rows 1074_number_of_submatrices_that_sum_to_target 1095_find_in_mountain_array 10_regular_expression_matching 1105_filling_bookcase_shelves 1106_parsing_a_boolean_expression 1110_delete_nodes_and_return_forest 1122_relative_sort_array 1137_n-th_tribonacci_number 1140_stone_game_ii 1143_longest_common_subsequence 1155_number_of_dice_rolls_with_target_sum 1160_find_words_that_can_be_formed_by_characters 1171_remove_zero_sum_consecutive_nodes_from_linked_list 118_pascals_triangle 1190_reverse_substrings_between_each_pair_of_parentheses 119_pascals_triangle_ii 11_container_with_most_water 1207_unique_number_of_occurences 1208_get_equal_substrings_within_budget 1219_path_with_maximum_gold 1220_count_vowels_permutation 1233_remove_sub_folders_from_the_filesystem 1235_maximum_profit_in_job_scheduling 1239_maximum_length_of_a_concatenated_string_with_unique_characters 1248_count_number_of_nice_subarrays 1249_minimum_remove_to_make_valid_parentheses 1255_maximum_score_words_formed_by_letters 1266_minimum_time_visiting_all_points 1269_number_of_ways_to_stay_in_the_same_place_after_some_steps 1277_count_square_submatrices_with_all_ones 1282_group_the_people_given_the_group_size_they_belong_to 1287_element_appearing_more_than_25_percent_in_sorted_array 1289_minimum_falling_path_sum_ii 1291_sequential_digits 1296_divide_array_in_sets_of_k_consecutive_numbers 129_sum_root_to_leaf_numbers 12_integer_to_roman 1310_xor_queries_of_a_subarray 131_palindrome_partitioning 1325_delete_leaves_with_a_given_value 1331_rank_transform_of_an_array 1334_find_the_city_with_smallest_number_of_neighbors_at_a_threshold_distance 1335_minimum_difficulty_of_a_job_schedule 1337_the_k_weakest_rows_in_a_matrix 1346_check_if_n_and_its_double_exist 1347_minimum_number_of_steps_to_make_two_strings_anagram 1356_sort_integres_by_the_number_of_1_bits 1359_count_all_valid_pickup_and_delivery_options 135_candy 1361_validate_binary_tree_nodes 1367_linked_list_in_binary_tree 1371_find_the_longest_substring_containing_vowels_in_even_counts 1380_lucky_numbers_in_a_matrix 1381_design_a_stack_with_increment_operation 1382_balance_a_binary_search_tree 138_copy_list_with_random_pointer 1395_count_number_of_teams 1404_number_of_steps_to_reduce_a_number_in_binary_representation_to_one 1405_longest_happy_string 140_word_break_ii 141_linked_list_cycle 1420_build_array_where_you_can_find_the_maximum_exactly_k_comparisons 1424_diagonal_traverse_ii 1425_constrained_subsequence_sum 1428_minimum_number_of_days_to_make_m_bouquets 1436_destination_city 1438_longest_continuous_subarray_with_absolute_diff_less_than_or_equal_to_limit 143_reorder_list 1441_build_an_array_with_stack_operations 1442_count_triplets_that_can_form_two_arrays_of_equal_xor 1442_maximum_score_after_splitting_a_string 1455_check_if_a_word_occurs_as_a_prefix_of_any_word_in_a_sentence 1457_pseudo_palindromic_paths_in_a_binary_tree 1458_max_dot_products_of_two_subsequences 145_binary_tree_postorder_traversal 1460_make_two_arrays_equal_by_reversing_subarrays 1463_cherry_pickup_ii 1464_maximum_product_of_two_elements_in_an_array 1481_least_number_of_unique_integers_after_k_removals 1496_path_crossing 1497_check_if_array_pairs_are_divisible_by_k 14_longest_common_prefix 1503_last_moment_before_all_ants_fall_out_of_a_plank 1508_range_sum_of_sorted_subarray_sums 1509_minimum_difference_between_largest_and_smallest_value_in_three_moves 150_evaluate_reverse_polish_notation 1512_number_of_good_pairs 1514_path_with_maximum_probability 1518_water_bottles 1530_number_of_good_leaf_nodes_pairs 1531_string_compression_ii 1535_find_the_winner_of_an_array_game 1544_make_the_string_great 1545_find_kth_bit_in_nth_binary_string 1550_three_consecutive_odds 1552_magnetic_force_between_two_balls 1561_maximum_number_of_coins_you_can_get 1568_minimum_number_of_days_to_disconnect_island 1574_shortest_subarray_to_be_removed_to_make_array_sorted 1578_minimum_time_to_make_rope_colorful 1579_remove_max_number_of_edges_to_keep_graph_fully_traversable 1582_special_positions_in_a_binary_matrix 1584_min_cost_to_connect_all_points 1590_make_sum_divisible_by_p 1593_split_a_string_into_the_max_number_of_unique_substrings 1598_crawler_log_folder 15_3sum 1605_find_valid_matrix_given_row_and_column_sums 1608_special_array_with_x_elements_greater_than_or_equal_to_x 1609_even_odd_tree 1611_minimum_one_bit_operations_to_make_integers_zero 1614_maximum_nesting_depth_of_the_parentheses 1624_largest_substring_between_two_equal_characters 1630_arithmetic_subarrays 1631_path_with_minimum_effort 1636_sort_array_by_increasing_frequency 1637_widest_vertical_area_between_two_points_containing_no_points 1642_furthest_building_you_can_reach 1647_minimum_deletions_to_make_character_frequencies 1652_defuse_the_bomb 1653_minimum_deletions_to_make_string_balanced 1657_determine_if_two_strings_are_close 1658_minimum_operations_to_reduce_x_to_zero 165_compare_version_numbers 1662_check_if_two_string_arrays_are_equivalent 1669_merge_in_between_linked_lists 1671_minimum_number_of_removals_to_make_mountain_array 1684_count_the_number_of_consistent_strings 1685_sum_of_absolute_differences_in_a_sorted_array 1688_count_of_matches_in_tournament 169_majority_element 16_3sum_closest 1700_number_of_students_unable_to_eat_lunch 1701_average_wait_time 1704_determine_if_string_halves_are_alike 1716_calculate_money_in_leetcode_bank 1717_maximum_score_from_removing_substrings 1727_largest_submatrix_with_rearrangements 1743_restore_the_array_from_adjacent_pairs 1750_minimum_length_of_string_after_deleting_similar_ends 1758_minimum_changes_to_make_alternating_binary_string 1759_count_number_of_homogenous_substrings 1760_minimum_limit_of_balls_in_a_bag 1791_find_center_of_star_graph 1793_maximum_score_of_a_good_subarray 179_largest_number 17_letter_combinations_of_a_phone_number 1813_sentence_similarity_iii 1814_count_nice_pairs_in_an_array 1823_find_the_winner_of_the_circular_game 1827_minimum_operations_to_make_the_array_increasing 1829_maximum_xor_for_each_query 1838_frequency_of_the_most_frequent_element 1845_seat_reservation_manager 1846_maximum_element_after_decreasing_and_rearranging 1861_rotating_the_box 1863_sum_of_all_subset_xor_totals 1877_minimize_maximum_pair_sum_in_array 1887_reduction_operations_to_make_the_array_elements_equal 1894_find_the_student_that_will_replace_the_chalk 1897_redistribute_characters_to_make_all_strings_equal 18_4sum 1903_largest_odd_number_in_string 1905_count_sub_islands 1913_maximum_product_difference_between_two_pairs 1915_number_of_wonderful_substrings 191_number_of_1_bits 1921_eliminate_maximum_number_of_monsters 1930_unique_length-3_palindromic_subsequences 1937_maximum_number_of_points_with_cost 1942_the_number_of_the_smallest_unoccupied_chair 1945_sum_of_digits_of_string_after_convert 1957_delete_characters_to_make_fancy_string 1963_minimum_number_of_swaps_to_make_the_string_balanced 1971_find_if_path_exists_in_graph 1975_maximum_matrix_sum 1980_find_unique_binary_string 198_house_robber 1992_find_all_groups_of_farmland 19_remove_nth_node_from_end_of_list 1_two_sum 2000_reverse_prefix_of_word 2009_minimum_number_of_operations_to_make_array_continuous 200_number_of_islands 201_bitwise_and_of_numbers_range 2022_convert_1d_array_into_2d_array 2028_find_missing_observations 2037_minimum_number_of_moves_to_seat_everyone 2038_remove_colored_pieces_if_both_neighbors_are_the_same_color 2044_count_number_of_maximum_bitwise_or_subsets 2045_second_minimum_time_to_reach_destination 2050_parallel_courses_iii 2053_kth_distinct_string_in_an_array 2058_find_the_minimum_and_maximum_number_of_nodes_between_critical_points 205_isomorphic_strings 2064_minimized_maximum_of_products_distributed_to_any_store 206_reverse_linked_list 2070_most_beautiful_item_for_each_query 2073_time_needed_to_buy_tickets 208_implement_trie_prefix_tree 2092_find_all_people_with_secret 2096_step_by_step_directions_from_a_binary_tree_node_to_another 2097_valid_arrangement_of_pairs 20_valid_parenthesis 2108_find_first_palindromic_string_in_the_array 210_course_schedule_ii 2125_number_of_laser_beams_in_a_bank 2134_minimum_swaps_to_group_all_1s_together_ii 2147_number_of_ways_to_divide_a_long_corridor 2149_rearrange_array_elements_by_sign 214_shortest_palindrome 2181_merge_nodes_in_between_zeros 2191_sort_the_jumbled_numbers 2192_all_ancestors_of_a_node_in_a_directed_acyclic_graph 2196_create_binary_tree_from_descriptions 21_merge_two_sorted_lists 2220_minimum_bit_flips_to_convert_number 2225_find_players_with_zero_or_one_losses 2251_number_of_flowers_in_full_bloom 2257_count_unguarded_cells_in_the_grid 225_implement_stack_using_queues 2264_largest_3-same-digit_number_in_string 2265_count_nodes_equal_to_average_of_subtree 2275_largest_combination_with_bitwise_and_greater_than_zero 2285_maximum_total_importance_of_roads 2290_minimum_obstacle_removal_to_reach_corner 229_majority_element_ii 22_generate_parentheses 231_power_of_two 2326_spiral_matrix_iv 232_implement_queue_using_stacks 2331_evaluate_boolean_binary_tree 2336_smallest_number_in_infinite_set 234_palindrome_linked_list 2353_design_a_food_rating_system 2370_longest_ideal_subsequence 2373_largest_local_values_in_a_matrix 237_delete_node_in_a_linked_list 2385_amount_of_time_for_binary_tree_to_be_infected 238_product_of_array_except_self 2391_minimum_amount_of_time_to_collect_garbage 2392_build_a_matrix_with_conditions 23_merge_k_sorted_lists 2402_meeting_room_ii 2406_divide_intervals_into_minimum_number_of_groups 2416_sum_of_prefix_scores_of_strings 2418_sort_the_people 2419_longest_subarray_with_maximum_bitwise_and 241_different_ways_to_add_parentheses 242_valid_anagram 2433_find_the_original_array_of_prefix_xor 2441_largest_positive_integer_that_exists_with_its_negative 2444_count_subarrays_with_fixed_bounds 2458_height_of_binary_tree_after_subtree_removal_queries 2461_maximum_sum_of_distinct_subarrays_with_length_k 2463_minimum_total_distance_traveled 2482_difference_between_ones_and_zeroes_in_row_and_column 2485_find_the_pivot_integer 2486_append_characters_to_string_to_make_subsequence 2487_remove_nodes_from_linked_list 2490_circular_sentence 2491_divide_players_into_teams_of_equal_skill 24_swap_nodes_in_pairs 2501_longest_square_streak_in_an_array 2516_take_k_of_each_character_from_left_and_right 2530_maximal_score_after_applying_k_operations 2540_minimum_common_value 2563_count_the_number_of_fair_pairs 2571_robot_collisions 2577_minimum_time_to_visit_a_cell_in_a_grid 2582_pass_the_pillow 2583_kth_largest_sum_in_a_binary_tree 258_add_digits 2597_the_number_of_beautiful_subsets 25_reverse_nodes_in_k_group 2601_prime_subtraction_operation 260_single_number_iii 2610_convert_an_array_into_a_2d_array_with_conditions 263_ugly_number 2641_cousins_in_binary_tree_ii 2642_design_graph_with_shortest_path_calculator 264_ugly_number_ii 2678_number_of_senior_citizens 2684_maximum_number_of_moves_in_a_grid 268_missing_number 2696_minimum_string_length_after_removing_substrings 2699_modify_graph_edge_weights 26_remove_duplicates_from_sorted_array 2706_buy_two_chocolates 2707_extra_characters_in_a_string 2709_greatest_common_divisor_traversal 273_integer_to_english_words 2742_painting_the_walls 2785_sort_vowels_in_a_string 279_perfect_squares 2807_insert_greatest_common_divisors_in_linked_list 2812_find_the_safest_path_in_a_grid 2816_double_a_number_represented_as_a_linked_list 2825_make_string_a_subsequence_using_cyclic_increments 2849_determine_if_a_cell_is_reachable_at_a_given_time 2864_maximum_odd_binary_number 2870_minimum_number_of_operations_to_make_array_empty 287_find_the_duplicate_number 28_find_the_index_of_the_first_occurrence_in_a_string 2914_minimum_number_of_changes_to_make_binary_string_beautiful 2924_find_champion_ii 2938_separate_black_and_white_balls 2958_length_of_longest_subarray_with_at_most_k_frequency 2962_count_subarrays_where_max_element_appears_at_least_k_times 2966_divide_array_into_arrays_with_max_difference 2971_find_polygon_with_largest_perimeter 2976_minimum_cost_to_convert_string_i 2997_minimum_number_of_operations_to_make_array_xor_equal_to_k 29_divide_two_integers 2_add_two_numbers 3005_count_elements_with_maximum_frequency 300_longest_increasing_subsequence 3011_find_if_array_can_be_sorted 3016_minimum_number_of_pushes_to_type_word_ii 3043_find_the_length_of_the_longest_common_prefix 3068_find_the_maximum_sum_of_node_values 3097_shortest_subarray_with_or_at_least_k_ii 310_minimum_height_trees 3110_score_of_a_string 3133_minimum_array_end 3163_string_compression_iii 316_remove_duplicate_letters 3217_delete_nodes_from_linked_list_present_in_array 322_reconstruct_itenerary 3243_shortest_distance_after_road_addition_queries_i 3254_find_the_power_of_k_size_subarrays_i 330_patching_array 338_counting_bits 341_flatten_nested_list_iterator 342_power_of_four 343_integer_break 344_reverse_string 349_intersection_of_two_arrays 34_find_first_and_last_position_of_element_in_sorted_array 350_intersection_of_two_arrays_ii 368_largest_divisible_subset 373_find_k_pairs_with_smallest_sums 377_combination_sum_iv 380_insert_delete_getrandom_o1 386_lexicographical_numbers 387_first_unique_character_in_a_string 389_find_the_difference 392_is_subsequence 39_combination_sum 3_longest_substring_without_repeating_characters 402_remove_k_digits 404_sum_of_left_leaves 409_longest_palindrome 40_combination_sum_ii 41_first_missing_positive 42_trapping_rain_water 432_all_o_one_data_structure 440_k_th_smallest_in_lexicographical_order 442_find_all_duplicates_in_an_array 446_arithmetic_slices_ii_subsequence 451_sort_characters_by_frequency 452_minimum_number_of_arrows_to_burst_balloons 455_assign_cookies 456_132_pattern 458_poor_pigs 463_island_perimeter 476_number_complement 496_next_greater_element_i 49_group_anagrams 4_median_of_two_sorted_arrays 501_find_mode_in_binary_search_tree 502_ipo 506_relative_ranks 50_pow_x_n 513_find_bottom_left_tree_value 514_freedom_trail 515_find_largest_value_in_each_tree_row 523_continuous_subarray_sum 525_contiguous_array 539_minimum_time_difference 543_diameter_of_binary_tree 551_student_attendance_record_i 552_student_attendance_record_ii 557_reverse_words_in_a_string_iii 560_subarray_sum_equals_k 564_find_the_closest_palindrome 567_permutation_in_string 576_out_of_boundary_paths 57_insert_interval 58_length_of_last_word 590_n_ary_tree_postorder_traversal 592_fraction_addition_and_subtraction 59_spiral_matrix_ii 5_longest_palindromic_substring 606_construct_string_from_binary_tree 621_task_scheduler 623_add_one_row_to_tree 624_maximum_distance_in_arrays 629_k_inverse_pairs_array 62_unique_paths 632_smallest_range_covering_elements_from_k_lists 633_sum_of_square_numbers 641_design_circular_deque 645_set_mismatch 647_palindromic_substrings 648_replace_words 650_2_keys_keyboard 661_image_smoother 664_strange_printer 670_maximum_swap 678_valid_parenthesis_string 684_redundant_connection 6_zigzag_conversion 703_kth_largest_element_in_a_stream 706_design_hashmap 70_climbing_stairs 713_subarray_product_less_than_k 719_find_k_th_smallest_pair_distance 725_split_linked_list_in_parts 726_number_of_atoms 729_my_calendar_i 731_my_calendar_ii 739_daily_temperatures 746_min_cost_climbing_stairs 752_open_the_lock 75_sort_colors 76_minimum_window_substring 773_sliding_puzzle 779_kth_symbol_in_grammar 786_k_th_smallest_prime_fraction 787_cheapest_flights_within_k_stops 78_subsets 791_custom_sort_string 796_rotate_string 799_champagne_tower 79_word_search 7_reverse_integer 815_bus_routes 823_binary_trees_with_factors 826_most_profit_assigning_work 834_sum_of_distances_in_tree 840_magic_squares_in_grid 844_backspace_string_compare 846_hand_of_straights 847_shortest_path_visiting_all_nodes 84_largest_rectangle_in_histogram 857_minimum_cost_to_hire_k_workers 85_maximal_rectangle 860_lemonade_change 861_score_after_flipping_matrix 862_shortest_subarray_with_sum_at_least_k 867_transpose_matrix 872_leaf_similar_trees 874_walking_robot_simulation 876_middle_of_the_linked_list 880_decoded_string_at_index 881_boats_to_save_people 884_uncommon_words_from_two_sentences 885_spiral_matrix_iii 896_monotonic_array 8_string_to_integer_atoi 905_sort_array_by_parity 907_sum_of_subarray_minimums 91_decode_ways 921_minimum_add_to_make_parentheses_valid 921_sort_an_array 92_reverse_linked_list_ii 930_binary_subarrays_with_sum 931_minimum_falling_path_sum 935_knight_dialer 938_range_sum_of_bst 945_minimum_increment_to_make_array_unique 947_most_stones_removed_with_same_row_or_column 948_bag_of_tokens 94_binary_tree_inorder_traversal 950_reveal_cards_in_increasing_order 951_flip_equivalent_binary_trees 959_regions_cut_by_slashes 962_maximum_width_ramp 974_subarray_sums_divisible_by_k 977_squares_of_a_sorted_array 979_distribute_coins_in_binary_tree 988_smallest_string_starting_from_leaf 992_subarrays_with_k_different_integers 993_cousins_in_binary_tree 995_minimum_number_of_k_consecutive_bit_flips 997_find_the_town_judge Click to show internal directories. Click to hide internal directories.