From d678e08f16f6ab325441e0dbec0a1bebe27c9de9 Mon Sep 17 00:00:00 2001 From: Yuchen Xie Date: Sun, 27 Oct 2019 22:43:15 +0800 Subject: [PATCH 01/47] Improve src/main.rs --- src/main.rs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index b914f2d9..967c5f85 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,7 +34,7 @@ fn main() { _ => { id = id_arg .parse::() - .expect(&format!("not a number: {}", id_arg)); + .unwrap_or_else(|_| panic!("not a number: {}", id_arg)); if solved_ids.contains(&id) { println!( "The problem you chose is invalid (the problem may have been solved \ @@ -45,16 +45,14 @@ fn main() { } } - let problem = problem::get_problem(id).expect(&format!( - "Error: failed to get problem #{} \ - (The problem may be paid-only or may not be exist).", - id - )); - let code = problem - .code_definition - .iter() - .filter(|&d| d.value == "rust") - .next(); + let problem = problem::get_problem(id).unwrap_or_else(|| { + panic!( + "Error: failed to get problem #{} \ + (The problem may be paid-only or may not be exist).", + id + ) + }); + let code = problem.code_definition.iter().find(|&d| d.value == "rust"); if code.is_none() { println!("Problem {} has no rust version.", &id); solved_ids.push(problem.question_id); @@ -100,7 +98,7 @@ fn main() { } } -fn generate_random_id(except_ids: &Vec) -> u32 { +fn generate_random_id(except_ids: &[u32]) -> u32 { use rand::Rng; use std::fs; let mut rng = rand::thread_rng(); @@ -124,7 +122,7 @@ fn get_solved_ids() -> Vec { for path in paths { let path = path.unwrap().path(); let s = path.to_str().unwrap(); - if s.chars().next().unwrap() != 'n' { + if !s.starts_with('n') { continue; } let id = &s[7..11]; From fea41bcf70a764c06bf9a5860036e8b40546d0da Mon Sep 17 00:00:00 2001 From: Jinze Li Date: Thu, 23 Jan 2020 01:38:51 +0900 Subject: [PATCH 02/47] Fixed the problem of generating wrong id --- src/lib.rs | 416 +++++++++--------- ...ci_number.rs => n0509_fibonacci_number.rs} | 0 ...inary_search.rs => n0704_binary_search.rs} | 0 ...ke_sorting.rs => n0969_pancake_sorting.rs} | 0 ... => n1018_binary_prefix_divisible_by_5.rs} | 0 ...e_weight.rs => n1046_last_stone_weight.rs} | 0 src/problem.rs | 2 +- 7 files changed, 209 insertions(+), 209 deletions(-) rename src/{n1013_fibonacci_number.rs => n0509_fibonacci_number.rs} (100%) rename src/{n0792_binary_search.rs => n0704_binary_search.rs} (100%) rename src/{n1009_pancake_sorting.rs => n0969_pancake_sorting.rs} (100%) rename src/{n1071_binary_prefix_divisible_by_5.rs => n1018_binary_prefix_divisible_by_5.rs} (100%) rename src/{n1127_last_stone_weight.rs => n1046_last_stone_weight.rs} (100%) diff --git a/src/lib.rs b/src/lib.rs index 7278e7b0..815c1ce0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,240 +1,240 @@ #[macro_use] pub mod util; -mod n0001_two_sum; -mod n0002_add_two_numbers; -mod n0003_longest_substring; -mod n0004_median_of_two_sorted_arrays; -mod n0005_longest_palindromic_substring; mod n0006_zigzag_conversion; -mod n0007_reverse_integer; -mod n0008_string_to_integer_atoi; -mod n0009_palindrome_number; -mod n0010_regular_expression_matching; -mod n0011_container_with_most_water; -mod n0012_integer_to_roman; -mod n0013_roman_to_integer; -mod n0014_longest_common_prefix; -mod n0015_3sum; -mod n0016_3sum_closest; -mod n0017_letter_combinations_of_a_phone_number; -mod n0018_4sum; -mod n0019_remove_nth_node_from_end_of_list; -mod n0020_valid_parentheses; -mod n0021_merge_two_sorted_lists; -mod n0022_generate_parentheses; -mod n0023_merge_k_sorted_lists; +mod n0238_product_of_array_except_self; +mod n0115_distinct_subsequences; +mod n0099_recover_binary_search_tree; +mod n0310_minimum_height_trees; +mod n0128_longest_consecutive_sequence; +mod n0274_h_index; +mod n0241_different_ways_to_add_parentheses; mod n0024_swap_nodes_in_pairs; -mod n0025_reverse_nodes_in_k_group; -mod n0026_remove_duplicates_from_sorted_array; +mod n0110_balanced_binary_tree; +mod n0093_restore_ip_addresses; +mod n0076_minimum_window_substring; +mod n0124_binary_tree_maximum_path_sum; +mod n0122_best_time_to_buy_and_sell_stock_ii; +mod n0169_majority_element; +mod n0162_find_peak_element; +mod n0095_unique_binary_search_trees_ii; +mod n0155_min_stack; +mod n0040_combination_sum_ii; +mod n0217_contains_duplicate; +mod n0055_jump_game; +mod n0106_construct_binary_tree_from_inorder_and_postorder_traversal; +mod n0145_binary_tree_postorder_traversal; +mod n0079_word_search; +mod n0969_pancake_sorting; +mod n0042_trapping_rain_water; +mod n0108_convert_sorted_array_to_binary_search_tree; +mod n0083_remove_duplicates_from_sorted_list; +mod n0130_surrounded_regions; +mod n0226_invert_binary_tree; mod n0027_remove_element; +mod n0188_best_time_to_buy_and_sell_stock_iv; +mod n0204_count_primes; +mod n0268_missing_number; +mod n0214_shortest_palindrome; +mod n0231_power_of_two; +mod n0202_happy_number; +mod n0075_sort_colors; +mod n0066_plus_one; mod n0028_implement_strstr; -mod n0029_divide_two_integers; +mod n0290_word_pattern; +mod n0048_rotate_image; +mod n0089_gray_code; +mod n0147_insertion_sort_list; +mod n0084_largest_rectangle_in_histogram; +mod n0011_container_with_most_water; +mod n0009_palindrome_number; +mod n0058_length_of_last_word; +mod n0080_remove_duplicates_from_sorted_array_ii; mod n0030_substring_with_concatenation_of_all_words; -mod n0031_next_permutation; -mod n0032_longest_valid_parentheses; -mod n0033_search_in_rotated_sorted_array; -mod n0034_find_first_and_last_position_of_element_in_sorted_array; -mod n0035_search_insert_position; -mod n0036_valid_sudoku; -mod n0037_sudoku_solver; +mod n0060_permutation_sequence; +mod n0071_simplify_path; mod n0038_count_and_say; -mod n0039_combination_sum; -mod n0040_combination_sum_ii; -mod n0041_first_missing_positive; -mod n0042_trapping_rain_water; -mod n0043_multiply_strings; -mod n0044_wildcard_matching; -mod n0045_jump_game_ii; -mod n0046_permutations; -mod n0047_permutations_ii; -mod n0048_rotate_image; -mod n0049_group_anagrams; +mod n0144_binary_tree_preorder_traversal; +mod n0279_perfect_squares; +mod n0304_range_sum_query_2d_immutable; +mod n0292_nim_game; +mod n0264_ugly_number_ii; +mod n0132_palindrome_partitioning_ii; +mod n0019_remove_nth_node_from_end_of_list; +mod n0136_single_number; +mod n0018_4sum; +mod n0220_contains_duplicate_iii; +mod n0299_bulls_and_cows; +mod n0232_implement_queue_using_stacks; +mod n0100_same_tree; +mod n0171_excel_sheet_column_number; +mod n0087_scramble_string; +mod n0704_binary_search; +mod n0219_contains_duplicate_ii; +mod n0086_partition_list; +mod n0082_remove_duplicates_from_sorted_list_ii; +mod n0228_summary_ranges; +mod n0020_valid_parentheses; +mod n0017_letter_combinations_of_a_phone_number; +mod n0312_burst_balloons; +mod n0306_additive_number; +mod n0283_move_zeroes; +mod n1018_binary_prefix_divisible_by_5; +mod n0201_bitwise_and_of_numbers_range; +mod n0109_convert_sorted_list_to_binary_search_tree; +mod n0101_symmetric_tree; +mod n0098_validate_binary_search_tree; +mod n0035_search_insert_position; mod n0050_powx_n; -mod n0051_n_queens; -mod n0052_n_queens_ii; -mod n0053_maximum_subarray; +mod n0198_house_robber; +mod n0004_median_of_two_sorted_arrays; +mod n0221_maximal_square; +mod n0047_permutations_ii; +mod n0172_factorial_trailing_zeroes; mod n0054_spiral_matrix; -mod n0055_jump_game; +mod n0053_maximum_subarray; +mod n1046_last_stone_weight; +mod n0146_lru_cache; +mod n0126_word_ladder_ii; +mod n0242_valid_anagram; +mod n0112_path_sum; +mod n0023_merge_k_sorted_lists; +mod n0230_kth_smallest_element_in_a_bst; +mod n0104_maximum_depth_of_binary_tree; +mod n0258_add_digits; +mod n0187_repeated_dna_sequences; +mod n0025_reverse_nodes_in_k_group; +mod n0039_combination_sum; +mod n0107_binary_tree_level_order_traversal_ii; +mod n0091_decode_ways; mod n0056_merge_intervals; -mod n0057_insert_interval; -mod n0058_length_of_last_word; -mod n0059_spiral_matrix_ii; -mod n0060_permutation_sequence; -mod n0061_rotate_list; -mod n0062_unique_paths; -mod n0063_unique_paths_ii; -mod n0064_minimum_path_sum; mod n0065_valid_number; -mod n0066_plus_one; -mod n0067_add_binary; -mod n0068_text_justification; -mod n0069_sqrtx; -mod n0070_climbing_stairs; -mod n0071_simplify_path; +mod n0016_3sum_closest; +mod n0096_unique_binary_search_trees; mod n0072_edit_distance; +mod n0044_wildcard_matching; +mod n0239_sliding_window_maximum; +mod n0174_dungeon_game; mod n0073_set_matrix_zeroes; -mod n0074_search_a_2d_matrix; -mod n0075_sort_colors; -mod n0076_minimum_window_substring; -mod n0077_combinations; mod n0078_subsets; -mod n0079_word_search; -mod n0080_remove_duplicates_from_sorted_array_ii; -mod n0081_search_in_rotated_sorted_array_ii; -mod n0082_remove_duplicates_from_sorted_list_ii; -mod n0083_remove_duplicates_from_sorted_list; -mod n0084_largest_rectangle_in_histogram; -mod n0085_maximal_rectangle; -mod n0086_partition_list; -mod n0087_scramble_string; -mod n0088_merge_sorted_array; -mod n0089_gray_code; -mod n0090_subsets_ii; -mod n0091_decode_ways; -mod n0092_reverse_linked_list_ii; -mod n0093_restore_ip_addresses; -mod n0094_binary_tree_inorder_traversal; -mod n0095_unique_binary_search_trees_ii; -mod n0096_unique_binary_search_trees; +mod n0037_sudoku_solver; +mod n0033_search_in_rotated_sorted_array; +mod n0002_add_two_numbers; +mod n0313_super_ugly_number; +mod n0068_text_justification; +mod n0064_minimum_path_sum; +mod n0218_the_skyline_problem; +mod n0125_valid_palindrome; +mod n0210_course_schedule_ii; +mod n0143_reorder_list; +mod n0164_maximum_gap; mod n0097_interleaving_string; -mod n0098_validate_binary_search_tree; -mod n0099_recover_binary_search_tree; -mod n0100_same_tree; -mod n0101_symmetric_tree; -mod n0102_binary_tree_level_order_traversal; -mod n0103_binary_tree_zigzag_level_order_traversal; -mod n0104_maximum_depth_of_binary_tree; mod n0105_construct_binary_tree_from_preorder_and_inorder_traversal; -mod n0106_construct_binary_tree_from_inorder_and_postorder_traversal; -mod n0107_binary_tree_level_order_traversal_ii; -mod n0108_convert_sorted_array_to_binary_search_tree; -mod n0109_convert_sorted_list_to_binary_search_tree; -mod n0110_balanced_binary_tree; -mod n0111_minimum_depth_of_binary_tree; -mod n0112_path_sum; -mod n0113_path_sum_ii; -mod n0114_flatten_binary_tree_to_linked_list; -mod n0115_distinct_subsequences; -mod n0118_pascals_triangle; -mod n0119_pascals_triangle_ii; -mod n0120_triangle; +mod n0167_two_sum_ii_input_array_is_sorted; +mod n0034_find_first_and_last_position_of_element_in_sorted_array; +mod n0094_binary_tree_inorder_traversal; +mod n0052_n_queens_ii; mod n0121_best_time_to_buy_and_sell_stock; -mod n0122_best_time_to_buy_and_sell_stock_ii; -mod n0123_best_time_to_buy_and_sell_stock_iii; -mod n0124_binary_tree_maximum_path_sum; -mod n0125_valid_palindrome; -mod n0126_word_ladder_ii; -mod n0127_word_ladder; -mod n0128_longest_consecutive_sequence; -mod n0129_sum_root_to_leaf_numbers; -mod n0130_surrounded_regions; -mod n0131_palindrome_partitioning; -mod n0132_palindrome_partitioning_ii; -mod n0134_gas_station; +mod n0273_integer_to_english_words; +mod n0225_implement_stack_using_queues; +mod n0046_permutations; +mod n0085_maximal_rectangle; mod n0135_candy; -mod n0136_single_number; -mod n0137_single_number_ii; -mod n0139_word_break; +mod n0113_path_sum_ii; +mod n0029_divide_two_integers; +mod n0260_single_number_iii; mod n0140_word_break_ii; -mod n0143_reorder_list; -mod n0144_binary_tree_preorder_traversal; -mod n0145_binary_tree_postorder_traversal; -mod n0146_lru_cache; -mod n0147_insertion_sort_list; -mod n0148_sort_list; mod n0149_max_points_on_a_line; -mod n0150_evaluate_reverse_polish_notation; -mod n0151_reverse_words_in_a_string; -mod n0152_maximum_product_subarray; -mod n0153_find_minimum_in_rotated_sorted_array; -mod n0154_find_minimum_in_rotated_sorted_array_ii; -mod n0155_min_stack; -mod n0162_find_peak_element; -mod n0164_maximum_gap; -mod n0165_compare_version_numbers; -mod n0166_fraction_to_recurring_decimal; -mod n0167_two_sum_ii_input_array_is_sorted; -mod n0168_excel_sheet_column_title; -mod n0169_majority_element; -mod n0171_excel_sheet_column_number; -mod n0172_factorial_trailing_zeroes; +mod n0213_house_robber_ii; +mod n0222_count_complete_tree_nodes; +mod n0134_gas_station; +mod n0057_insert_interval; mod n0173_binary_search_tree_iterator; -mod n0174_dungeon_game; -mod n0179_largest_number; -mod n0187_repeated_dna_sequences; -mod n0188_best_time_to_buy_and_sell_stock_iv; +mod n0077_combinations; +mod n0005_longest_palindromic_substring; +mod n0041_first_missing_positive; +mod n0026_remove_duplicates_from_sorted_array; +mod n0166_fraction_to_recurring_decimal; +mod n0119_pascals_triangle_ii; +mod n0012_integer_to_roman; +mod n0223_rectangle_area; +mod n0229_majority_element_ii; +mod n0061_rotate_list; +mod n0123_best_time_to_buy_and_sell_stock_iii; +mod n0301_remove_invalid_parentheses; +mod n0067_add_binary; +mod n0049_group_anagrams; mod n0189_rotate_array; -mod n0198_house_robber; -mod n0199_binary_tree_right_side_view; -mod n0200_number_of_islands; -mod n0201_bitwise_and_of_numbers_range; -mod n0202_happy_number; -mod n0203_remove_linked_list_elements; -mod n0204_count_primes; -mod n0205_isomorphic_strings; -mod n0206_reverse_linked_list; -mod n0207_course_schedule; +mod n0001_two_sum; +mod n0275_h_index_ii; +mod n0103_binary_tree_zigzag_level_order_traversal; +mod n0137_single_number_ii; mod n0208_implement_trie_prefix_tree; +mod n0300_longest_increasing_subsequence; +mod n0118_pascals_triangle; +mod n0010_regular_expression_matching; +mod n0013_roman_to_integer; mod n0209_minimum_size_subarray_sum; -mod n0210_course_schedule_ii; -mod n0211_add_and_search_word_data_structure_design; -mod n0212_word_search_ii; -mod n0213_house_robber_ii; -mod n0214_shortest_palindrome; -mod n0215_kth_largest_element_in_an_array; -mod n0216_combination_sum_iii; -mod n0217_contains_duplicate; -mod n0218_the_skyline_problem; -mod n0219_contains_duplicate_ii; -mod n0220_contains_duplicate_iii; -mod n0221_maximal_square; -mod n0222_count_complete_tree_nodes; -mod n0223_rectangle_area; -mod n0224_basic_calculator; -mod n0225_implement_stack_using_queues; -mod n0226_invert_binary_tree; mod n0227_basic_calculator_ii; -mod n0228_summary_ranges; -mod n0229_majority_element_ii; -mod n0230_kth_smallest_element_in_a_bst; -mod n0231_power_of_two; -mod n0232_implement_queue_using_stacks; +mod n0022_generate_parentheses; +mod n0008_string_to_integer_atoi; +mod n0152_maximum_product_subarray; +mod n0014_longest_common_prefix; +mod n0070_climbing_stairs; mod n0233_number_of_digit_one; -mod n0238_product_of_array_except_self; -mod n0239_sliding_window_maximum; -mod n0241_different_ways_to_add_parentheses; -mod n0242_valid_anagram; -mod n0257_binary_tree_paths; -mod n0258_add_digits; -mod n0260_single_number_iii; +mod n0154_find_minimum_in_rotated_sorted_array_ii; +mod n0127_word_ladder; +mod n0207_course_schedule; mod n0263_ugly_number; -mod n0264_ugly_number_ii; -mod n0268_missing_number; -mod n0273_integer_to_english_words; -mod n0274_h_index; -mod n0275_h_index_ii; -mod n0279_perfect_squares; -mod n0282_expression_add_operators; -mod n0283_move_zeroes; +mod n0295_find_median_from_data_stream; +mod n0148_sort_list; +mod n0257_binary_tree_paths; +mod n0120_triangle; +mod n0309_best_time_to_buy_and_sell_stock_with_cooldown; +mod n0074_search_a_2d_matrix; +mod n0215_kth_largest_element_in_an_array; +mod n0203_remove_linked_list_elements; +mod n0081_search_in_rotated_sorted_array_ii; +mod n0059_spiral_matrix_ii; +mod n0151_reverse_words_in_a_string; +mod n0205_isomorphic_strings; +mod n0179_largest_number; +mod n0168_excel_sheet_column_title; +mod n0007_reverse_integer; +mod n0032_longest_valid_parentheses; +mod n0165_compare_version_numbers; +mod n0031_next_permutation; +mod n0088_merge_sorted_array; +mod n0509_fibonacci_number; +mod n0036_valid_sudoku; +mod n0069_sqrtx; +mod n0211_add_and_search_word_data_structure_design; +mod n0114_flatten_binary_tree_to_linked_list; +mod n0224_basic_calculator; +mod n0045_jump_game_ii; +mod n0051_n_queens; +mod n0212_word_search_ii; mod n0287_find_the_duplicate_number; +mod n0153_find_minimum_in_rotated_sorted_array; mod n0289_game_of_life; -mod n0290_word_pattern; -mod n0292_nim_game; -mod n0295_find_median_from_data_stream; -mod n0299_bulls_and_cows; -mod n0300_longest_increasing_subsequence; -mod n0301_remove_invalid_parentheses; -mod n0303_range_sum_query_immutable; -mod n0304_range_sum_query_2d_immutable; -mod n0306_additive_number; +mod n0200_number_of_islands; +mod n0015_3sum; +mod n0216_combination_sum_iii; +mod n0043_multiply_strings; +mod n0090_subsets_ii; +mod n0003_longest_substring; +mod n0139_word_break; +mod n0150_evaluate_reverse_polish_notation; +mod n0063_unique_paths_ii; +mod n0062_unique_paths; +mod n0199_binary_tree_right_side_view; +mod n0282_expression_add_operators; +mod n0021_merge_two_sorted_lists; +mod n0129_sum_root_to_leaf_numbers; +mod n0206_reverse_linked_list; +mod n0131_palindrome_partitioning; mod n0307_range_sum_query_mutable; -mod n0309_best_time_to_buy_and_sell_stock_with_cooldown; -mod n0310_minimum_height_trees; -mod n0312_burst_balloons; -mod n0313_super_ugly_number; -mod n0792_binary_search; -mod n1009_pancake_sorting; -mod n1013_fibonacci_number; -mod n1071_binary_prefix_divisible_by_5; -mod n1127_last_stone_weight; +mod n0111_minimum_depth_of_binary_tree; +mod n0092_reverse_linked_list_ii; +mod n0303_range_sum_query_immutable; +mod n0102_binary_tree_level_order_traversal; diff --git a/src/n1013_fibonacci_number.rs b/src/n0509_fibonacci_number.rs similarity index 100% rename from src/n1013_fibonacci_number.rs rename to src/n0509_fibonacci_number.rs diff --git a/src/n0792_binary_search.rs b/src/n0704_binary_search.rs similarity index 100% rename from src/n0792_binary_search.rs rename to src/n0704_binary_search.rs diff --git a/src/n1009_pancake_sorting.rs b/src/n0969_pancake_sorting.rs similarity index 100% rename from src/n1009_pancake_sorting.rs rename to src/n0969_pancake_sorting.rs diff --git a/src/n1071_binary_prefix_divisible_by_5.rs b/src/n1018_binary_prefix_divisible_by_5.rs similarity index 100% rename from src/n1071_binary_prefix_divisible_by_5.rs rename to src/n1018_binary_prefix_divisible_by_5.rs diff --git a/src/n1127_last_stone_weight.rs b/src/n1046_last_stone_weight.rs similarity index 100% rename from src/n1127_last_stone_weight.rs rename to src/n1046_last_stone_weight.rs diff --git a/src/problem.rs b/src/problem.rs index 712135a4..d4f7310f 100644 --- a/src/problem.rs +++ b/src/problem.rs @@ -42,7 +42,7 @@ pub fn get_problem(frontend_question_id: u32) -> Option { content: resp.data.question.content, sample_test_case: resp.data.question.sample_test_case, difficulty: problem.difficulty.to_string(), - question_id: problem.stat.question_id, + question_id: problem.stat.frontend_question_id, }); } } From d6e135c0b53bb0871f1026a76aeff8812d81498e Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 13:14:54 +0800 Subject: [PATCH 03/47] separate problems and answers --- .gitignore | 1 + src/{problem.rs => fetcher.rs} | 0 src/lib.rs | 239 +----------------- src/main.rs | 16 +- src/problem/mod.rs | 0 src/solution/mod.rs | 237 +++++++++++++++++ .../s0001_two_sum.rs} | 0 .../s0002_add_two_numbers.rs} | 2 +- .../s0003_longest_substring.rs} | 0 .../s0004_median_of_two_sorted_arrays.rs} | 0 .../s0005_longest_palindromic_substring.rs} | 0 .../s0006_zigzag_conversion.rs} | 0 .../s0007_reverse_integer.rs} | 0 .../s0008_string_to_integer_atoi.rs} | 0 .../s0009_palindrome_number.rs} | 0 .../s0010_regular_expression_matching.rs} | 0 .../s0011_container_with_most_water.rs} | 0 .../s0012_integer_to_roman.rs} | 0 .../s0013_roman_to_integer.rs} | 0 .../s0014_longest_common_prefix.rs} | 0 src/{n0015_3sum.rs => solution/s0015_3sum.rs} | 0 .../s0016_3sum_closest.rs} | 0 ..._letter_combinations_of_a_phone_number.rs} | 0 src/{n0018_4sum.rs => solution/s0018_4sum.rs} | 0 ...s0019_remove_nth_node_from_end_of_list.rs} | 2 +- .../s0020_valid_parentheses.rs} | 0 .../s0021_merge_two_sorted_lists.rs} | 2 +- .../s0022_generate_parentheses.rs} | 0 .../s0023_merge_k_sorted_lists.rs} | 2 +- .../s0024_swap_nodes_in_pairs.rs} | 2 +- .../s0025_reverse_nodes_in_k_group.rs} | 2 +- ...26_remove_duplicates_from_sorted_array.rs} | 0 .../s0027_remove_element.rs} | 0 .../s0028_implement_strstr.rs} | 0 .../s0029_divide_two_integers.rs} | 0 ...string_with_concatenation_of_all_words.rs} | 0 .../s0031_next_permutation.rs} | 0 .../s0032_longest_valid_parentheses.rs} | 0 .../s0033_search_in_rotated_sorted_array.rs} | 0 ...st_position_of_element_in_sorted_array.rs} | 0 .../s0035_search_insert_position.rs} | 0 .../s0036_valid_sudoku.rs} | 0 .../s0037_sudoku_solver.rs} | 0 .../s0038_count_and_say.rs} | 0 .../s0039_combination_sum.rs} | 0 .../s0040_combination_sum_ii.rs} | 0 .../s0041_first_missing_positive.rs} | 0 .../s0042_trapping_rain_water.rs} | 0 .../s0043_multiply_strings.rs} | 0 .../s0044_wildcard_matching.rs} | 0 .../s0045_jump_game_ii.rs} | 0 .../s0046_permutations.rs} | 0 .../s0047_permutations_ii.rs} | 0 .../s0048_rotate_image.rs} | 0 .../s0049_group_anagrams.rs} | 0 .../s0050_powx_n.rs} | 0 .../s0051_n_queens.rs} | 0 .../s0052_n_queens_ii.rs} | 0 .../s0053_maximum_subarray.rs} | 0 .../s0054_spiral_matrix.rs} | 0 .../s0055_jump_game.rs} | 0 .../s0056_merge_intervals.rs} | 0 .../s0057_insert_interval.rs} | 0 .../s0058_length_of_last_word.rs} | 0 .../s0059_spiral_matrix_ii.rs} | 0 .../s0060_permutation_sequence.rs} | 0 .../s0061_rotate_list.rs} | 2 +- .../s0062_unique_paths.rs} | 0 .../s0063_unique_paths_ii.rs} | 0 .../s0064_minimum_path_sum.rs} | 0 .../s0065_valid_number.rs} | 0 .../s0066_plus_one.rs} | 0 .../s0067_add_binary.rs} | 0 .../s0068_text_justification.rs} | 0 .../s0069_sqrtx.rs} | 0 .../s0070_climbing_stairs.rs} | 0 .../s0071_simplify_path.rs} | 0 .../s0072_edit_distance.rs} | 0 .../s0073_set_matrix_zeroes.rs} | 0 .../s0074_search_a_2d_matrix.rs} | 0 .../s0075_sort_colors.rs} | 0 .../s0076_minimum_window_substring.rs} | 0 .../s0077_combinations.rs} | 0 .../s0078_subsets.rs} | 0 .../s0079_word_search.rs} | 0 ...remove_duplicates_from_sorted_array_ii.rs} | 0 ...0081_search_in_rotated_sorted_array_ii.rs} | 0 ..._remove_duplicates_from_sorted_list_ii.rs} | 2 +- ...083_remove_duplicates_from_sorted_list.rs} | 2 +- .../s0084_largest_rectangle_in_histogram.rs} | 0 .../s0085_maximal_rectangle.rs} | 0 .../s0086_partition_list.rs} | 2 +- .../s0087_scramble_string.rs} | 0 .../s0088_merge_sorted_array.rs} | 0 .../s0089_gray_code.rs} | 0 .../s0090_subsets_ii.rs} | 0 .../s0091_decode_ways.rs} | 0 .../s0092_reverse_linked_list_ii.rs} | 2 +- .../s0093_restore_ip_addresses.rs} | 0 .../s0094_binary_tree_inorder_traversal.rs} | 2 +- .../s0095_unique_binary_search_trees_ii.rs} | 2 +- .../s0096_unique_binary_search_trees.rs} | 0 .../s0097_interleaving_string.rs} | 0 .../s0098_validate_binary_search_tree.rs} | 2 +- .../s0099_recover_binary_search_tree.rs} | 2 +- .../s0100_same_tree.rs} | 2 +- .../s0101_symmetric_tree.rs} | 2 +- ...0102_binary_tree_level_order_traversal.rs} | 2 +- ...nary_tree_zigzag_level_order_traversal.rs} | 2 +- .../s0104_maximum_depth_of_binary_tree.rs} | 2 +- ...ee_from_preorder_and_inorder_traversal.rs} | 2 +- ...e_from_inorder_and_postorder_traversal.rs} | 2 +- ...7_binary_tree_level_order_traversal_ii.rs} | 2 +- ...ert_sorted_array_to_binary_search_tree.rs} | 2 +- ...vert_sorted_list_to_binary_search_tree.rs} | 4 +- .../s0110_balanced_binary_tree.rs} | 2 +- .../s0111_minimum_depth_of_binary_tree.rs} | 2 +- .../s0112_path_sum.rs} | 2 +- .../s0113_path_sum_ii.rs} | 2 +- ...114_flatten_binary_tree_to_linked_list.rs} | 2 +- .../s0115_distinct_subsequences.rs} | 0 .../s0118_pascals_triangle.rs} | 0 .../s0119_pascals_triangle_ii.rs} | 0 .../s0120_triangle.rs} | 0 .../s0121_best_time_to_buy_and_sell_stock.rs} | 0 ...122_best_time_to_buy_and_sell_stock_ii.rs} | 0 ...23_best_time_to_buy_and_sell_stock_iii.rs} | 0 .../s0124_binary_tree_maximum_path_sum.rs} | 2 +- .../s0125_valid_palindrome.rs} | 0 .../s0126_word_ladder_ii.rs} | 0 .../s0127_word_ladder.rs} | 0 .../s0128_longest_consecutive_sequence.rs} | 0 .../s0129_sum_root_to_leaf_numbers.rs} | 2 +- .../s0130_surrounded_regions.rs} | 0 .../s0131_palindrome_partitioning.rs} | 0 .../s0132_palindrome_partitioning_ii.rs} | 0 .../s0134_gas_station.rs} | 0 .../s0135_candy.rs} | 0 .../s0136_single_number.rs} | 0 .../s0137_single_number_ii.rs} | 0 .../s0139_word_break.rs} | 0 .../s0140_word_break_ii.rs} | 0 .../s0143_reorder_list.rs} | 2 +- .../s0144_binary_tree_preorder_traversal.rs} | 2 +- .../s0145_binary_tree_postorder_traversal.rs} | 2 +- .../s0146_lru_cache.rs} | 0 .../s0147_insertion_sort_list.rs} | 4 +- .../s0148_sort_list.rs} | 2 +- .../s0149_max_points_on_a_line.rs} | 4 +- ...s0150_evaluate_reverse_polish_notation.rs} | 0 .../s0151_reverse_words_in_a_string.rs} | 0 .../s0152_maximum_product_subarray.rs} | 0 ...3_find_minimum_in_rotated_sorted_array.rs} | 0 ...ind_minimum_in_rotated_sorted_array_ii.rs} | 0 .../s0155_min_stack.rs} | 0 .../s0162_find_peak_element.rs} | 0 .../s0164_maximum_gap.rs} | 0 .../s0165_compare_version_numbers.rs} | 0 .../s0166_fraction_to_recurring_decimal.rs} | 0 ...s0167_two_sum_ii_input_array_is_sorted.rs} | 0 .../s0168_excel_sheet_column_title.rs} | 0 .../s0169_majority_element.rs} | 0 .../s0171_excel_sheet_column_number.rs} | 0 .../s0172_factorial_trailing_zeroes.rs} | 0 .../s0173_binary_search_tree_iterator.rs} | 6 +- .../s0174_dungeon_game.rs} | 0 .../s0179_largest_number.rs} | 0 .../s0187_repeated_dna_sequences.rs} | 0 ...188_best_time_to_buy_and_sell_stock_iv.rs} | 0 .../s0189_rotate_array.rs} | 0 .../s0198_house_robber.rs} | 0 .../s0199_binary_tree_right_side_view.rs} | 2 +- .../s0200_number_of_islands.rs} | 0 .../s0201_bitwise_and_of_numbers_range.rs} | 0 .../s0202_happy_number.rs} | 0 .../s0203_remove_linked_list_elements.rs} | 2 +- .../s0204_count_primes.rs} | 0 .../s0205_isomorphic_strings.rs} | 0 .../s0206_reverse_linked_list.rs} | 2 +- .../s0207_course_schedule.rs} | 0 .../s0208_implement_trie_prefix_tree.rs} | 0 .../s0209_minimum_size_subarray_sum.rs} | 0 .../s0210_course_schedule_ii.rs} | 0 ..._and_search_word_data_structure_design.rs} | 0 .../s0212_word_search_ii.rs} | 0 .../s0213_house_robber_ii.rs} | 0 .../s0214_shortest_palindrome.rs} | 0 .../s0215_kth_largest_element_in_an_array.rs} | 0 .../s0216_combination_sum_iii.rs} | 0 .../s0217_contains_duplicate.rs} | 0 .../s0218_the_skyline_problem.rs} | 0 .../s0219_contains_duplicate_ii.rs} | 0 .../s0220_contains_duplicate_iii.rs} | 0 .../s0221_maximal_square.rs} | 0 .../s0222_count_complete_tree_nodes.rs} | 2 +- .../s0223_rectangle_area.rs} | 0 .../s0224_basic_calculator.rs} | 0 .../s0225_implement_stack_using_queues.rs} | 0 .../s0226_invert_binary_tree.rs} | 2 +- .../s0227_basic_calculator_ii.rs} | 0 .../s0228_summary_ranges.rs} | 0 .../s0229_majority_element_ii.rs} | 0 .../s0230_kth_smallest_element_in_a_bst.rs} | 2 +- .../s0231_power_of_two.rs} | 0 .../s0232_implement_queue_using_stacks.rs} | 0 .../s0233_number_of_digit_one.rs} | 0 .../s0238_product_of_array_except_self.rs} | 0 .../s0239_sliding_window_maximum.rs} | 0 ...0241_different_ways_to_add_parentheses.rs} | 0 .../s0242_valid_anagram.rs} | 0 .../s0257_binary_tree_paths.rs} | 2 +- .../s0258_add_digits.rs} | 0 .../s0260_single_number_iii.rs} | 0 .../s0263_ugly_number.rs} | 0 .../s0264_ugly_number_ii.rs} | 0 .../s0268_missing_number.rs} | 0 .../s0273_integer_to_english_words.rs} | 0 .../s0274_h_index.rs} | 0 .../s0275_h_index_ii.rs} | 0 .../s0279_perfect_squares.rs} | 0 .../s0282_expression_add_operators.rs} | 0 .../s0283_move_zeroes.rs} | 0 .../s0287_find_the_duplicate_number.rs} | 0 .../s0289_game_of_life.rs} | 0 .../s0290_word_pattern.rs} | 0 .../s0292_nim_game.rs} | 0 .../s0295_find_median_from_data_stream.rs} | 0 .../s0299_bulls_and_cows.rs} | 0 .../s0300_longest_increasing_subsequence.rs} | 0 .../s0301_remove_invalid_parentheses.rs} | 0 .../s0303_range_sum_query_immutable.rs} | 0 .../s0304_range_sum_query_2d_immutable.rs} | 0 .../s0306_additive_number.rs} | 0 .../s0307_range_sum_query_mutable.rs} | 0 ...me_to_buy_and_sell_stock_with_cooldown.rs} | 0 .../s0310_minimum_height_trees.rs} | 0 .../s0312_burst_balloons.rs} | 0 .../s0313_super_ugly_number.rs} | 0 .../s0509_fibonacci_number.rs} | 0 .../s0704_binary_search.rs} | 0 .../s0969_pancake_sorting.rs} | 0 .../s1018_binary_prefix_divisible_by_5.rs} | 0 .../s1046_last_stone_weight.rs} | 0 243 files changed, 299 insertions(+), 296 deletions(-) rename src/{problem.rs => fetcher.rs} (100%) create mode 100644 src/problem/mod.rs create mode 100644 src/solution/mod.rs rename src/{n0001_two_sum.rs => solution/s0001_two_sum.rs} (100%) rename src/{n0002_add_two_numbers.rs => solution/s0002_add_two_numbers.rs} (98%) rename src/{n0003_longest_substring.rs => solution/s0003_longest_substring.rs} (100%) rename src/{n0004_median_of_two_sorted_arrays.rs => solution/s0004_median_of_two_sorted_arrays.rs} (100%) rename src/{n0005_longest_palindromic_substring.rs => solution/s0005_longest_palindromic_substring.rs} (100%) rename src/{n0006_zigzag_conversion.rs => solution/s0006_zigzag_conversion.rs} (100%) rename src/{n0007_reverse_integer.rs => solution/s0007_reverse_integer.rs} (100%) rename src/{n0008_string_to_integer_atoi.rs => solution/s0008_string_to_integer_atoi.rs} (100%) rename src/{n0009_palindrome_number.rs => solution/s0009_palindrome_number.rs} (100%) rename src/{n0010_regular_expression_matching.rs => solution/s0010_regular_expression_matching.rs} (100%) rename src/{n0011_container_with_most_water.rs => solution/s0011_container_with_most_water.rs} (100%) rename src/{n0012_integer_to_roman.rs => solution/s0012_integer_to_roman.rs} (100%) rename src/{n0013_roman_to_integer.rs => solution/s0013_roman_to_integer.rs} (100%) rename src/{n0014_longest_common_prefix.rs => solution/s0014_longest_common_prefix.rs} (100%) rename src/{n0015_3sum.rs => solution/s0015_3sum.rs} (100%) rename src/{n0016_3sum_closest.rs => solution/s0016_3sum_closest.rs} (100%) rename src/{n0017_letter_combinations_of_a_phone_number.rs => solution/s0017_letter_combinations_of_a_phone_number.rs} (100%) rename src/{n0018_4sum.rs => solution/s0018_4sum.rs} (100%) rename src/{n0019_remove_nth_node_from_end_of_list.rs => solution/s0019_remove_nth_node_from_end_of_list.rs} (97%) rename src/{n0020_valid_parentheses.rs => solution/s0020_valid_parentheses.rs} (100%) rename src/{n0021_merge_two_sorted_lists.rs => solution/s0021_merge_two_sorted_lists.rs} (97%) rename src/{n0022_generate_parentheses.rs => solution/s0022_generate_parentheses.rs} (100%) rename src/{n0023_merge_k_sorted_lists.rs => solution/s0023_merge_k_sorted_lists.rs} (97%) rename src/{n0024_swap_nodes_in_pairs.rs => solution/s0024_swap_nodes_in_pairs.rs} (97%) rename src/{n0025_reverse_nodes_in_k_group.rs => solution/s0025_reverse_nodes_in_k_group.rs} (98%) rename src/{n0026_remove_duplicates_from_sorted_array.rs => solution/s0026_remove_duplicates_from_sorted_array.rs} (100%) rename src/{n0027_remove_element.rs => solution/s0027_remove_element.rs} (100%) rename src/{n0028_implement_strstr.rs => solution/s0028_implement_strstr.rs} (100%) rename src/{n0029_divide_two_integers.rs => solution/s0029_divide_two_integers.rs} (100%) rename src/{n0030_substring_with_concatenation_of_all_words.rs => solution/s0030_substring_with_concatenation_of_all_words.rs} (100%) rename src/{n0031_next_permutation.rs => solution/s0031_next_permutation.rs} (100%) rename src/{n0032_longest_valid_parentheses.rs => solution/s0032_longest_valid_parentheses.rs} (100%) rename src/{n0033_search_in_rotated_sorted_array.rs => solution/s0033_search_in_rotated_sorted_array.rs} (100%) rename src/{n0034_find_first_and_last_position_of_element_in_sorted_array.rs => solution/s0034_find_first_and_last_position_of_element_in_sorted_array.rs} (100%) rename src/{n0035_search_insert_position.rs => solution/s0035_search_insert_position.rs} (100%) rename src/{n0036_valid_sudoku.rs => solution/s0036_valid_sudoku.rs} (100%) rename src/{n0037_sudoku_solver.rs => solution/s0037_sudoku_solver.rs} (100%) rename src/{n0038_count_and_say.rs => solution/s0038_count_and_say.rs} (100%) rename src/{n0039_combination_sum.rs => solution/s0039_combination_sum.rs} (100%) rename src/{n0040_combination_sum_ii.rs => solution/s0040_combination_sum_ii.rs} (100%) rename src/{n0041_first_missing_positive.rs => solution/s0041_first_missing_positive.rs} (100%) rename src/{n0042_trapping_rain_water.rs => solution/s0042_trapping_rain_water.rs} (100%) rename src/{n0043_multiply_strings.rs => solution/s0043_multiply_strings.rs} (100%) rename src/{n0044_wildcard_matching.rs => solution/s0044_wildcard_matching.rs} (100%) rename src/{n0045_jump_game_ii.rs => solution/s0045_jump_game_ii.rs} (100%) rename src/{n0046_permutations.rs => solution/s0046_permutations.rs} (100%) rename src/{n0047_permutations_ii.rs => solution/s0047_permutations_ii.rs} (100%) rename src/{n0048_rotate_image.rs => solution/s0048_rotate_image.rs} (100%) rename src/{n0049_group_anagrams.rs => solution/s0049_group_anagrams.rs} (100%) rename src/{n0050_powx_n.rs => solution/s0050_powx_n.rs} (100%) rename src/{n0051_n_queens.rs => solution/s0051_n_queens.rs} (100%) rename src/{n0052_n_queens_ii.rs => solution/s0052_n_queens_ii.rs} (100%) rename src/{n0053_maximum_subarray.rs => solution/s0053_maximum_subarray.rs} (100%) rename src/{n0054_spiral_matrix.rs => solution/s0054_spiral_matrix.rs} (100%) rename src/{n0055_jump_game.rs => solution/s0055_jump_game.rs} (100%) rename src/{n0056_merge_intervals.rs => solution/s0056_merge_intervals.rs} (100%) rename src/{n0057_insert_interval.rs => solution/s0057_insert_interval.rs} (100%) rename src/{n0058_length_of_last_word.rs => solution/s0058_length_of_last_word.rs} (100%) rename src/{n0059_spiral_matrix_ii.rs => solution/s0059_spiral_matrix_ii.rs} (100%) rename src/{n0060_permutation_sequence.rs => solution/s0060_permutation_sequence.rs} (100%) rename src/{n0061_rotate_list.rs => solution/s0061_rotate_list.rs} (94%) rename src/{n0062_unique_paths.rs => solution/s0062_unique_paths.rs} (100%) rename src/{n0063_unique_paths_ii.rs => solution/s0063_unique_paths_ii.rs} (100%) rename src/{n0064_minimum_path_sum.rs => solution/s0064_minimum_path_sum.rs} (100%) rename src/{n0065_valid_number.rs => solution/s0065_valid_number.rs} (100%) rename src/{n0066_plus_one.rs => solution/s0066_plus_one.rs} (100%) rename src/{n0067_add_binary.rs => solution/s0067_add_binary.rs} (100%) rename src/{n0068_text_justification.rs => solution/s0068_text_justification.rs} (100%) rename src/{n0069_sqrtx.rs => solution/s0069_sqrtx.rs} (100%) rename src/{n0070_climbing_stairs.rs => solution/s0070_climbing_stairs.rs} (100%) rename src/{n0071_simplify_path.rs => solution/s0071_simplify_path.rs} (100%) rename src/{n0072_edit_distance.rs => solution/s0072_edit_distance.rs} (100%) rename src/{n0073_set_matrix_zeroes.rs => solution/s0073_set_matrix_zeroes.rs} (100%) rename src/{n0074_search_a_2d_matrix.rs => solution/s0074_search_a_2d_matrix.rs} (100%) rename src/{n0075_sort_colors.rs => solution/s0075_sort_colors.rs} (100%) rename src/{n0076_minimum_window_substring.rs => solution/s0076_minimum_window_substring.rs} (100%) rename src/{n0077_combinations.rs => solution/s0077_combinations.rs} (100%) rename src/{n0078_subsets.rs => solution/s0078_subsets.rs} (100%) rename src/{n0079_word_search.rs => solution/s0079_word_search.rs} (100%) rename src/{n0080_remove_duplicates_from_sorted_array_ii.rs => solution/s0080_remove_duplicates_from_sorted_array_ii.rs} (100%) rename src/{n0081_search_in_rotated_sorted_array_ii.rs => solution/s0081_search_in_rotated_sorted_array_ii.rs} (100%) rename src/{n0082_remove_duplicates_from_sorted_list_ii.rs => solution/s0082_remove_duplicates_from_sorted_list_ii.rs} (94%) rename src/{n0083_remove_duplicates_from_sorted_list.rs => solution/s0083_remove_duplicates_from_sorted_list.rs} (94%) rename src/{n0084_largest_rectangle_in_histogram.rs => solution/s0084_largest_rectangle_in_histogram.rs} (100%) rename src/{n0085_maximal_rectangle.rs => solution/s0085_maximal_rectangle.rs} (100%) rename src/{n0086_partition_list.rs => solution/s0086_partition_list.rs} (97%) rename src/{n0087_scramble_string.rs => solution/s0087_scramble_string.rs} (100%) rename src/{n0088_merge_sorted_array.rs => solution/s0088_merge_sorted_array.rs} (100%) rename src/{n0089_gray_code.rs => solution/s0089_gray_code.rs} (100%) rename src/{n0090_subsets_ii.rs => solution/s0090_subsets_ii.rs} (100%) rename src/{n0091_decode_ways.rs => solution/s0091_decode_ways.rs} (100%) rename src/{n0092_reverse_linked_list_ii.rs => solution/s0092_reverse_linked_list_ii.rs} (94%) rename src/{n0093_restore_ip_addresses.rs => solution/s0093_restore_ip_addresses.rs} (100%) rename src/{n0094_binary_tree_inorder_traversal.rs => solution/s0094_binary_tree_inorder_traversal.rs} (96%) rename src/{n0095_unique_binary_search_trees_ii.rs => solution/s0095_unique_binary_search_trees_ii.rs} (97%) rename src/{n0096_unique_binary_search_trees.rs => solution/s0096_unique_binary_search_trees.rs} (100%) rename src/{n0097_interleaving_string.rs => solution/s0097_interleaving_string.rs} (100%) rename src/{n0098_validate_binary_search_tree.rs => solution/s0098_validate_binary_search_tree.rs} (98%) rename src/{n0099_recover_binary_search_tree.rs => solution/s0099_recover_binary_search_tree.rs} (95%) rename src/{n0100_same_tree.rs => solution/s0100_same_tree.rs} (96%) rename src/{n0101_symmetric_tree.rs => solution/s0101_symmetric_tree.rs} (97%) rename src/{n0102_binary_tree_level_order_traversal.rs => solution/s0102_binary_tree_level_order_traversal.rs} (97%) rename src/{n0103_binary_tree_zigzag_level_order_traversal.rs => solution/s0103_binary_tree_zigzag_level_order_traversal.rs} (97%) rename src/{n0104_maximum_depth_of_binary_tree.rs => solution/s0104_maximum_depth_of_binary_tree.rs} (96%) rename src/{n0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs => solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs} (97%) rename src/{n0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs => solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs} (97%) rename src/{n0107_binary_tree_level_order_traversal_ii.rs => solution/s0107_binary_tree_level_order_traversal_ii.rs} (97%) rename src/{n0108_convert_sorted_array_to_binary_search_tree.rs => solution/s0108_convert_sorted_array_to_binary_search_tree.rs} (97%) rename src/{n0109_convert_sorted_list_to_binary_search_tree.rs => solution/s0109_convert_sorted_list_to_binary_search_tree.rs} (94%) rename src/{n0110_balanced_binary_tree.rs => solution/s0110_balanced_binary_tree.rs} (93%) rename src/{n0111_minimum_depth_of_binary_tree.rs => solution/s0111_minimum_depth_of_binary_tree.rs} (96%) rename src/{n0112_path_sum.rs => solution/s0112_path_sum.rs} (97%) rename src/{n0113_path_sum_ii.rs => solution/s0113_path_sum_ii.rs} (97%) rename src/{n0114_flatten_binary_tree_to_linked_list.rs => solution/s0114_flatten_binary_tree_to_linked_list.rs} (97%) rename src/{n0115_distinct_subsequences.rs => solution/s0115_distinct_subsequences.rs} (100%) rename src/{n0118_pascals_triangle.rs => solution/s0118_pascals_triangle.rs} (100%) rename src/{n0119_pascals_triangle_ii.rs => solution/s0119_pascals_triangle_ii.rs} (100%) rename src/{n0120_triangle.rs => solution/s0120_triangle.rs} (100%) rename src/{n0121_best_time_to_buy_and_sell_stock.rs => solution/s0121_best_time_to_buy_and_sell_stock.rs} (100%) rename src/{n0122_best_time_to_buy_and_sell_stock_ii.rs => solution/s0122_best_time_to_buy_and_sell_stock_ii.rs} (100%) rename src/{n0123_best_time_to_buy_and_sell_stock_iii.rs => solution/s0123_best_time_to_buy_and_sell_stock_iii.rs} (100%) rename src/{n0124_binary_tree_maximum_path_sum.rs => solution/s0124_binary_tree_maximum_path_sum.rs} (98%) rename src/{n0125_valid_palindrome.rs => solution/s0125_valid_palindrome.rs} (100%) rename src/{n0126_word_ladder_ii.rs => solution/s0126_word_ladder_ii.rs} (100%) rename src/{n0127_word_ladder.rs => solution/s0127_word_ladder.rs} (100%) rename src/{n0128_longest_consecutive_sequence.rs => solution/s0128_longest_consecutive_sequence.rs} (100%) rename src/{n0129_sum_root_to_leaf_numbers.rs => solution/s0129_sum_root_to_leaf_numbers.rs} (97%) rename src/{n0130_surrounded_regions.rs => solution/s0130_surrounded_regions.rs} (100%) rename src/{n0131_palindrome_partitioning.rs => solution/s0131_palindrome_partitioning.rs} (100%) rename src/{n0132_palindrome_partitioning_ii.rs => solution/s0132_palindrome_partitioning_ii.rs} (100%) rename src/{n0134_gas_station.rs => solution/s0134_gas_station.rs} (100%) rename src/{n0135_candy.rs => solution/s0135_candy.rs} (100%) rename src/{n0136_single_number.rs => solution/s0136_single_number.rs} (100%) rename src/{n0137_single_number_ii.rs => solution/s0137_single_number_ii.rs} (100%) rename src/{n0139_word_break.rs => solution/s0139_word_break.rs} (100%) rename src/{n0140_word_break_ii.rs => solution/s0140_word_break_ii.rs} (100%) rename src/{n0143_reorder_list.rs => solution/s0143_reorder_list.rs} (93%) rename src/{n0144_binary_tree_preorder_traversal.rs => solution/s0144_binary_tree_preorder_traversal.rs} (96%) rename src/{n0145_binary_tree_postorder_traversal.rs => solution/s0145_binary_tree_postorder_traversal.rs} (96%) rename src/{n0146_lru_cache.rs => solution/s0146_lru_cache.rs} (100%) rename src/{n0147_insertion_sort_list.rs => solution/s0147_insertion_sort_list.rs} (96%) rename src/{n0148_sort_list.rs => solution/s0148_sort_list.rs} (98%) rename src/{n0149_max_points_on_a_line.rs => solution/s0149_max_points_on_a_line.rs} (95%) rename src/{n0150_evaluate_reverse_polish_notation.rs => solution/s0150_evaluate_reverse_polish_notation.rs} (100%) rename src/{n0151_reverse_words_in_a_string.rs => solution/s0151_reverse_words_in_a_string.rs} (100%) rename src/{n0152_maximum_product_subarray.rs => solution/s0152_maximum_product_subarray.rs} (100%) rename src/{n0153_find_minimum_in_rotated_sorted_array.rs => solution/s0153_find_minimum_in_rotated_sorted_array.rs} (100%) rename src/{n0154_find_minimum_in_rotated_sorted_array_ii.rs => solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs} (100%) rename src/{n0155_min_stack.rs => solution/s0155_min_stack.rs} (100%) rename src/{n0162_find_peak_element.rs => solution/s0162_find_peak_element.rs} (100%) rename src/{n0164_maximum_gap.rs => solution/s0164_maximum_gap.rs} (100%) rename src/{n0165_compare_version_numbers.rs => solution/s0165_compare_version_numbers.rs} (100%) rename src/{n0166_fraction_to_recurring_decimal.rs => solution/s0166_fraction_to_recurring_decimal.rs} (100%) rename src/{n0167_two_sum_ii_input_array_is_sorted.rs => solution/s0167_two_sum_ii_input_array_is_sorted.rs} (100%) rename src/{n0168_excel_sheet_column_title.rs => solution/s0168_excel_sheet_column_title.rs} (100%) rename src/{n0169_majority_element.rs => solution/s0169_majority_element.rs} (100%) rename src/{n0171_excel_sheet_column_number.rs => solution/s0171_excel_sheet_column_number.rs} (100%) rename src/{n0172_factorial_trailing_zeroes.rs => solution/s0172_factorial_trailing_zeroes.rs} (100%) rename src/{n0173_binary_search_tree_iterator.rs => solution/s0173_binary_search_tree_iterator.rs} (94%) rename src/{n0174_dungeon_game.rs => solution/s0174_dungeon_game.rs} (100%) rename src/{n0179_largest_number.rs => solution/s0179_largest_number.rs} (100%) rename src/{n0187_repeated_dna_sequences.rs => solution/s0187_repeated_dna_sequences.rs} (100%) rename src/{n0188_best_time_to_buy_and_sell_stock_iv.rs => solution/s0188_best_time_to_buy_and_sell_stock_iv.rs} (100%) rename src/{n0189_rotate_array.rs => solution/s0189_rotate_array.rs} (100%) rename src/{n0198_house_robber.rs => solution/s0198_house_robber.rs} (100%) rename src/{n0199_binary_tree_right_side_view.rs => solution/s0199_binary_tree_right_side_view.rs} (97%) rename src/{n0200_number_of_islands.rs => solution/s0200_number_of_islands.rs} (100%) rename src/{n0201_bitwise_and_of_numbers_range.rs => solution/s0201_bitwise_and_of_numbers_range.rs} (100%) rename src/{n0202_happy_number.rs => solution/s0202_happy_number.rs} (100%) rename src/{n0203_remove_linked_list_elements.rs => solution/s0203_remove_linked_list_elements.rs} (95%) rename src/{n0204_count_primes.rs => solution/s0204_count_primes.rs} (100%) rename src/{n0205_isomorphic_strings.rs => solution/s0205_isomorphic_strings.rs} (100%) rename src/{n0206_reverse_linked_list.rs => solution/s0206_reverse_linked_list.rs} (94%) rename src/{n0207_course_schedule.rs => solution/s0207_course_schedule.rs} (100%) rename src/{n0208_implement_trie_prefix_tree.rs => solution/s0208_implement_trie_prefix_tree.rs} (100%) rename src/{n0209_minimum_size_subarray_sum.rs => solution/s0209_minimum_size_subarray_sum.rs} (100%) rename src/{n0210_course_schedule_ii.rs => solution/s0210_course_schedule_ii.rs} (100%) rename src/{n0211_add_and_search_word_data_structure_design.rs => solution/s0211_add_and_search_word_data_structure_design.rs} (100%) rename src/{n0212_word_search_ii.rs => solution/s0212_word_search_ii.rs} (100%) rename src/{n0213_house_robber_ii.rs => solution/s0213_house_robber_ii.rs} (100%) rename src/{n0214_shortest_palindrome.rs => solution/s0214_shortest_palindrome.rs} (100%) rename src/{n0215_kth_largest_element_in_an_array.rs => solution/s0215_kth_largest_element_in_an_array.rs} (100%) rename src/{n0216_combination_sum_iii.rs => solution/s0216_combination_sum_iii.rs} (100%) rename src/{n0217_contains_duplicate.rs => solution/s0217_contains_duplicate.rs} (100%) rename src/{n0218_the_skyline_problem.rs => solution/s0218_the_skyline_problem.rs} (100%) rename src/{n0219_contains_duplicate_ii.rs => solution/s0219_contains_duplicate_ii.rs} (100%) rename src/{n0220_contains_duplicate_iii.rs => solution/s0220_contains_duplicate_iii.rs} (100%) rename src/{n0221_maximal_square.rs => solution/s0221_maximal_square.rs} (100%) rename src/{n0222_count_complete_tree_nodes.rs => solution/s0222_count_complete_tree_nodes.rs} (98%) rename src/{n0223_rectangle_area.rs => solution/s0223_rectangle_area.rs} (100%) rename src/{n0224_basic_calculator.rs => solution/s0224_basic_calculator.rs} (100%) rename src/{n0225_implement_stack_using_queues.rs => solution/s0225_implement_stack_using_queues.rs} (100%) rename src/{n0226_invert_binary_tree.rs => solution/s0226_invert_binary_tree.rs} (97%) rename src/{n0227_basic_calculator_ii.rs => solution/s0227_basic_calculator_ii.rs} (100%) rename src/{n0228_summary_ranges.rs => solution/s0228_summary_ranges.rs} (100%) rename src/{n0229_majority_element_ii.rs => solution/s0229_majority_element_ii.rs} (100%) rename src/{n0230_kth_smallest_element_in_a_bst.rs => solution/s0230_kth_smallest_element_in_a_bst.rs} (97%) rename src/{n0231_power_of_two.rs => solution/s0231_power_of_two.rs} (100%) rename src/{n0232_implement_queue_using_stacks.rs => solution/s0232_implement_queue_using_stacks.rs} (100%) rename src/{n0233_number_of_digit_one.rs => solution/s0233_number_of_digit_one.rs} (100%) rename src/{n0238_product_of_array_except_self.rs => solution/s0238_product_of_array_except_self.rs} (100%) rename src/{n0239_sliding_window_maximum.rs => solution/s0239_sliding_window_maximum.rs} (100%) rename src/{n0241_different_ways_to_add_parentheses.rs => solution/s0241_different_ways_to_add_parentheses.rs} (100%) rename src/{n0242_valid_anagram.rs => solution/s0242_valid_anagram.rs} (100%) rename src/{n0257_binary_tree_paths.rs => solution/s0257_binary_tree_paths.rs} (97%) rename src/{n0258_add_digits.rs => solution/s0258_add_digits.rs} (100%) rename src/{n0260_single_number_iii.rs => solution/s0260_single_number_iii.rs} (100%) rename src/{n0263_ugly_number.rs => solution/s0263_ugly_number.rs} (100%) rename src/{n0264_ugly_number_ii.rs => solution/s0264_ugly_number_ii.rs} (100%) rename src/{n0268_missing_number.rs => solution/s0268_missing_number.rs} (100%) rename src/{n0273_integer_to_english_words.rs => solution/s0273_integer_to_english_words.rs} (100%) rename src/{n0274_h_index.rs => solution/s0274_h_index.rs} (100%) rename src/{n0275_h_index_ii.rs => solution/s0275_h_index_ii.rs} (100%) rename src/{n0279_perfect_squares.rs => solution/s0279_perfect_squares.rs} (100%) rename src/{n0282_expression_add_operators.rs => solution/s0282_expression_add_operators.rs} (100%) rename src/{n0283_move_zeroes.rs => solution/s0283_move_zeroes.rs} (100%) rename src/{n0287_find_the_duplicate_number.rs => solution/s0287_find_the_duplicate_number.rs} (100%) rename src/{n0289_game_of_life.rs => solution/s0289_game_of_life.rs} (100%) rename src/{n0290_word_pattern.rs => solution/s0290_word_pattern.rs} (100%) rename src/{n0292_nim_game.rs => solution/s0292_nim_game.rs} (100%) rename src/{n0295_find_median_from_data_stream.rs => solution/s0295_find_median_from_data_stream.rs} (100%) rename src/{n0299_bulls_and_cows.rs => solution/s0299_bulls_and_cows.rs} (100%) rename src/{n0300_longest_increasing_subsequence.rs => solution/s0300_longest_increasing_subsequence.rs} (100%) rename src/{n0301_remove_invalid_parentheses.rs => solution/s0301_remove_invalid_parentheses.rs} (100%) rename src/{n0303_range_sum_query_immutable.rs => solution/s0303_range_sum_query_immutable.rs} (100%) rename src/{n0304_range_sum_query_2d_immutable.rs => solution/s0304_range_sum_query_2d_immutable.rs} (100%) rename src/{n0306_additive_number.rs => solution/s0306_additive_number.rs} (100%) rename src/{n0307_range_sum_query_mutable.rs => solution/s0307_range_sum_query_mutable.rs} (100%) rename src/{n0309_best_time_to_buy_and_sell_stock_with_cooldown.rs => solution/s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs} (100%) rename src/{n0310_minimum_height_trees.rs => solution/s0310_minimum_height_trees.rs} (100%) rename src/{n0312_burst_balloons.rs => solution/s0312_burst_balloons.rs} (100%) rename src/{n0313_super_ugly_number.rs => solution/s0313_super_ugly_number.rs} (100%) rename src/{n0509_fibonacci_number.rs => solution/s0509_fibonacci_number.rs} (100%) rename src/{n0704_binary_search.rs => solution/s0704_binary_search.rs} (100%) rename src/{n0969_pancake_sorting.rs => solution/s0969_pancake_sorting.rs} (100%) rename src/{n1018_binary_prefix_divisible_by_5.rs => solution/s1018_binary_prefix_divisible_by_5.rs} (100%) rename src/{n1046_last_stone_weight.rs => solution/s1046_last_stone_weight.rs} (100%) diff --git a/.gitignore b/.gitignore index 2f7896d1..96ef862d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ target/ +.idea/ diff --git a/src/problem.rs b/src/fetcher.rs similarity index 100% rename from src/problem.rs rename to src/fetcher.rs diff --git a/src/lib.rs b/src/lib.rs index 815c1ce0..55b0298f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,240 +1,5 @@ #[macro_use] pub mod util; -mod n0006_zigzag_conversion; -mod n0238_product_of_array_except_self; -mod n0115_distinct_subsequences; -mod n0099_recover_binary_search_tree; -mod n0310_minimum_height_trees; -mod n0128_longest_consecutive_sequence; -mod n0274_h_index; -mod n0241_different_ways_to_add_parentheses; -mod n0024_swap_nodes_in_pairs; -mod n0110_balanced_binary_tree; -mod n0093_restore_ip_addresses; -mod n0076_minimum_window_substring; -mod n0124_binary_tree_maximum_path_sum; -mod n0122_best_time_to_buy_and_sell_stock_ii; -mod n0169_majority_element; -mod n0162_find_peak_element; -mod n0095_unique_binary_search_trees_ii; -mod n0155_min_stack; -mod n0040_combination_sum_ii; -mod n0217_contains_duplicate; -mod n0055_jump_game; -mod n0106_construct_binary_tree_from_inorder_and_postorder_traversal; -mod n0145_binary_tree_postorder_traversal; -mod n0079_word_search; -mod n0969_pancake_sorting; -mod n0042_trapping_rain_water; -mod n0108_convert_sorted_array_to_binary_search_tree; -mod n0083_remove_duplicates_from_sorted_list; -mod n0130_surrounded_regions; -mod n0226_invert_binary_tree; -mod n0027_remove_element; -mod n0188_best_time_to_buy_and_sell_stock_iv; -mod n0204_count_primes; -mod n0268_missing_number; -mod n0214_shortest_palindrome; -mod n0231_power_of_two; -mod n0202_happy_number; -mod n0075_sort_colors; -mod n0066_plus_one; -mod n0028_implement_strstr; -mod n0290_word_pattern; -mod n0048_rotate_image; -mod n0089_gray_code; -mod n0147_insertion_sort_list; -mod n0084_largest_rectangle_in_histogram; -mod n0011_container_with_most_water; -mod n0009_palindrome_number; -mod n0058_length_of_last_word; -mod n0080_remove_duplicates_from_sorted_array_ii; -mod n0030_substring_with_concatenation_of_all_words; -mod n0060_permutation_sequence; -mod n0071_simplify_path; -mod n0038_count_and_say; -mod n0144_binary_tree_preorder_traversal; -mod n0279_perfect_squares; -mod n0304_range_sum_query_2d_immutable; -mod n0292_nim_game; -mod n0264_ugly_number_ii; -mod n0132_palindrome_partitioning_ii; -mod n0019_remove_nth_node_from_end_of_list; -mod n0136_single_number; -mod n0018_4sum; -mod n0220_contains_duplicate_iii; -mod n0299_bulls_and_cows; -mod n0232_implement_queue_using_stacks; -mod n0100_same_tree; -mod n0171_excel_sheet_column_number; -mod n0087_scramble_string; -mod n0704_binary_search; -mod n0219_contains_duplicate_ii; -mod n0086_partition_list; -mod n0082_remove_duplicates_from_sorted_list_ii; -mod n0228_summary_ranges; -mod n0020_valid_parentheses; -mod n0017_letter_combinations_of_a_phone_number; -mod n0312_burst_balloons; -mod n0306_additive_number; -mod n0283_move_zeroes; -mod n1018_binary_prefix_divisible_by_5; -mod n0201_bitwise_and_of_numbers_range; -mod n0109_convert_sorted_list_to_binary_search_tree; -mod n0101_symmetric_tree; -mod n0098_validate_binary_search_tree; -mod n0035_search_insert_position; -mod n0050_powx_n; -mod n0198_house_robber; -mod n0004_median_of_two_sorted_arrays; -mod n0221_maximal_square; -mod n0047_permutations_ii; -mod n0172_factorial_trailing_zeroes; -mod n0054_spiral_matrix; -mod n0053_maximum_subarray; -mod n1046_last_stone_weight; -mod n0146_lru_cache; -mod n0126_word_ladder_ii; -mod n0242_valid_anagram; -mod n0112_path_sum; -mod n0023_merge_k_sorted_lists; -mod n0230_kth_smallest_element_in_a_bst; -mod n0104_maximum_depth_of_binary_tree; -mod n0258_add_digits; -mod n0187_repeated_dna_sequences; -mod n0025_reverse_nodes_in_k_group; -mod n0039_combination_sum; -mod n0107_binary_tree_level_order_traversal_ii; -mod n0091_decode_ways; -mod n0056_merge_intervals; -mod n0065_valid_number; -mod n0016_3sum_closest; -mod n0096_unique_binary_search_trees; -mod n0072_edit_distance; -mod n0044_wildcard_matching; -mod n0239_sliding_window_maximum; -mod n0174_dungeon_game; -mod n0073_set_matrix_zeroes; -mod n0078_subsets; -mod n0037_sudoku_solver; -mod n0033_search_in_rotated_sorted_array; -mod n0002_add_two_numbers; -mod n0313_super_ugly_number; -mod n0068_text_justification; -mod n0064_minimum_path_sum; -mod n0218_the_skyline_problem; -mod n0125_valid_palindrome; -mod n0210_course_schedule_ii; -mod n0143_reorder_list; -mod n0164_maximum_gap; -mod n0097_interleaving_string; -mod n0105_construct_binary_tree_from_preorder_and_inorder_traversal; -mod n0167_two_sum_ii_input_array_is_sorted; -mod n0034_find_first_and_last_position_of_element_in_sorted_array; -mod n0094_binary_tree_inorder_traversal; -mod n0052_n_queens_ii; -mod n0121_best_time_to_buy_and_sell_stock; -mod n0273_integer_to_english_words; -mod n0225_implement_stack_using_queues; -mod n0046_permutations; -mod n0085_maximal_rectangle; -mod n0135_candy; -mod n0113_path_sum_ii; -mod n0029_divide_two_integers; -mod n0260_single_number_iii; -mod n0140_word_break_ii; -mod n0149_max_points_on_a_line; -mod n0213_house_robber_ii; -mod n0222_count_complete_tree_nodes; -mod n0134_gas_station; -mod n0057_insert_interval; -mod n0173_binary_search_tree_iterator; -mod n0077_combinations; -mod n0005_longest_palindromic_substring; -mod n0041_first_missing_positive; -mod n0026_remove_duplicates_from_sorted_array; -mod n0166_fraction_to_recurring_decimal; -mod n0119_pascals_triangle_ii; -mod n0012_integer_to_roman; -mod n0223_rectangle_area; -mod n0229_majority_element_ii; -mod n0061_rotate_list; -mod n0123_best_time_to_buy_and_sell_stock_iii; -mod n0301_remove_invalid_parentheses; -mod n0067_add_binary; -mod n0049_group_anagrams; -mod n0189_rotate_array; -mod n0001_two_sum; -mod n0275_h_index_ii; -mod n0103_binary_tree_zigzag_level_order_traversal; -mod n0137_single_number_ii; -mod n0208_implement_trie_prefix_tree; -mod n0300_longest_increasing_subsequence; -mod n0118_pascals_triangle; -mod n0010_regular_expression_matching; -mod n0013_roman_to_integer; -mod n0209_minimum_size_subarray_sum; -mod n0227_basic_calculator_ii; -mod n0022_generate_parentheses; -mod n0008_string_to_integer_atoi; -mod n0152_maximum_product_subarray; -mod n0014_longest_common_prefix; -mod n0070_climbing_stairs; -mod n0233_number_of_digit_one; -mod n0154_find_minimum_in_rotated_sorted_array_ii; -mod n0127_word_ladder; -mod n0207_course_schedule; -mod n0263_ugly_number; -mod n0295_find_median_from_data_stream; -mod n0148_sort_list; -mod n0257_binary_tree_paths; -mod n0120_triangle; -mod n0309_best_time_to_buy_and_sell_stock_with_cooldown; -mod n0074_search_a_2d_matrix; -mod n0215_kth_largest_element_in_an_array; -mod n0203_remove_linked_list_elements; -mod n0081_search_in_rotated_sorted_array_ii; -mod n0059_spiral_matrix_ii; -mod n0151_reverse_words_in_a_string; -mod n0205_isomorphic_strings; -mod n0179_largest_number; -mod n0168_excel_sheet_column_title; -mod n0007_reverse_integer; -mod n0032_longest_valid_parentheses; -mod n0165_compare_version_numbers; -mod n0031_next_permutation; -mod n0088_merge_sorted_array; -mod n0509_fibonacci_number; -mod n0036_valid_sudoku; -mod n0069_sqrtx; -mod n0211_add_and_search_word_data_structure_design; -mod n0114_flatten_binary_tree_to_linked_list; -mod n0224_basic_calculator; -mod n0045_jump_game_ii; -mod n0051_n_queens; -mod n0212_word_search_ii; -mod n0287_find_the_duplicate_number; -mod n0153_find_minimum_in_rotated_sorted_array; -mod n0289_game_of_life; -mod n0200_number_of_islands; -mod n0015_3sum; -mod n0216_combination_sum_iii; -mod n0043_multiply_strings; -mod n0090_subsets_ii; -mod n0003_longest_substring; -mod n0139_word_break; -mod n0150_evaluate_reverse_polish_notation; -mod n0063_unique_paths_ii; -mod n0062_unique_paths; -mod n0199_binary_tree_right_side_view; -mod n0282_expression_add_operators; -mod n0021_merge_two_sorted_lists; -mod n0129_sum_root_to_leaf_numbers; -mod n0206_reverse_linked_list; -mod n0131_palindrome_partitioning; -mod n0307_range_sum_query_mutable; -mod n0111_minimum_depth_of_binary_tree; -mod n0092_reverse_linked_list_ii; -mod n0303_range_sum_query_immutable; -mod n0102_binary_tree_level_order_traversal; +pub mod solution; +pub mod problem; diff --git a/src/main.rs b/src/main.rs index 967c5f85..e25be217 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ extern crate serde_derive; #[macro_use] extern crate serde_json; -mod problem; +mod fetcher; use std::env; use std::fs; @@ -45,7 +45,7 @@ fn main() { } } - let problem = problem::get_problem(id).unwrap_or_else(|| { + let problem = fetcher::get_problem(id).unwrap_or_else(|| { panic!( "Error: failed to get problem #{} \ (The problem may be paid-only or may not be exist).", @@ -61,11 +61,11 @@ fn main() { let code = code.unwrap(); let file_name = format!( - "n{:04}_{}", + "p{:04}_{}", problem.question_id, problem.title_slug.replace("-", "_") ); - let file_path = Path::new("./src").join(format!("{}.rs", file_name)); + let file_path = Path::new("./src/problem").join(format!("{}.rs", file_name)); if file_path.exists() { panic!("problem already initialized"); } @@ -91,7 +91,7 @@ fn main() { let mut lib_file = fs::OpenOptions::new() .write(true) .append(true) - .open("./src/lib.rs") + .open("./src/problem/mod.rs") .unwrap(); writeln!(lib_file, "mod {};", file_name); break; @@ -136,13 +136,13 @@ fn parse_extra_use(code: &str) -> String { let mut extra_use_line = String::new(); // a linked-list problem if code.contains("pub struct ListNode") { - extra_use_line.push_str("\nuse super::util::linked_list::{ListNode, to_list};") + extra_use_line.push_str("\nuse crate::util::linked_list::{ListNode, to_list};") } if code.contains("pub struct TreeNode") { - extra_use_line.push_str("\nuse super::util::tree::{TreeNode, to_tree};") + extra_use_line.push_str("\nuse crate::util::tree::{TreeNode, to_tree};") } if code.contains("pub struct Point") { - extra_use_line.push_str("\nuse super::util::point::Point;") + extra_use_line.push_str("\nuse crate::util::point::Point;") } extra_use_line } diff --git a/src/problem/mod.rs b/src/problem/mod.rs new file mode 100644 index 00000000..e69de29b diff --git a/src/solution/mod.rs b/src/solution/mod.rs new file mode 100644 index 00000000..3b079b74 --- /dev/null +++ b/src/solution/mod.rs @@ -0,0 +1,237 @@ +mod s0006_zigzag_conversion; +mod s0238_product_of_array_except_self; +mod s0115_distinct_subsequences; +mod s0099_recover_binary_search_tree; +mod s0310_minimum_height_trees; +mod s0128_longest_consecutive_sequence; +mod s0274_h_index; +mod s0241_different_ways_to_add_parentheses; +mod s0024_swap_nodes_in_pairs; +mod s0110_balanced_binary_tree; +mod s0093_restore_ip_addresses; +mod s0076_minimum_window_substring; +mod s0124_binary_tree_maximum_path_sum; +mod s0122_best_time_to_buy_and_sell_stock_ii; +mod s0169_majority_element; +mod s0162_find_peak_element; +mod s0095_unique_binary_search_trees_ii; +mod s0155_min_stack; +mod s0040_combination_sum_ii; +mod s0217_contains_duplicate; +mod s0055_jump_game; +mod s0106_construct_binary_tree_from_inorder_and_postorder_traversal; +mod s0145_binary_tree_postorder_traversal; +mod s0079_word_search; +mod s0969_pancake_sorting; +mod s0042_trapping_rain_water; +mod s0108_convert_sorted_array_to_binary_search_tree; +mod s0083_remove_duplicates_from_sorted_list; +mod s0130_surrounded_regions; +mod s0226_invert_binary_tree; +mod s0027_remove_element; +mod s0188_best_time_to_buy_and_sell_stock_iv; +mod s0204_count_primes; +mod s0268_missing_number; +mod s0214_shortest_palindrome; +mod s0231_power_of_two; +mod s0202_happy_number; +mod s0075_sort_colors; +mod s0066_plus_one; +mod s0028_implement_strstr; +mod s0290_word_pattern; +mod s0048_rotate_image; +mod s0089_gray_code; +mod s0147_insertion_sort_list; +mod s0084_largest_rectangle_in_histogram; +mod s0011_container_with_most_water; +mod s0009_palindrome_number; +mod s0058_length_of_last_word; +mod s0080_remove_duplicates_from_sorted_array_ii; +mod s0030_substring_with_concatenation_of_all_words; +mod s0060_permutation_sequence; +mod s0071_simplify_path; +mod s0038_count_and_say; +mod s0144_binary_tree_preorder_traversal; +mod s0279_perfect_squares; +mod s0304_range_sum_query_2d_immutable; +mod s0292_nim_game; +mod s0264_ugly_number_ii; +mod s0132_palindrome_partitioning_ii; +mod s0019_remove_nth_node_from_end_of_list; +mod s0136_single_number; +mod s0018_4sum; +mod s0220_contains_duplicate_iii; +mod s0299_bulls_and_cows; +mod s0232_implement_queue_using_stacks; +mod s0100_same_tree; +mod s0171_excel_sheet_column_number; +mod s0087_scramble_string; +mod s0704_binary_search; +mod s0219_contains_duplicate_ii; +mod s0086_partition_list; +mod s0082_remove_duplicates_from_sorted_list_ii; +mod s0228_summary_ranges; +mod s0020_valid_parentheses; +mod s0017_letter_combinations_of_a_phone_number; +mod s0312_burst_balloons; +mod s0306_additive_number; +mod s0283_move_zeroes; +mod s1018_binary_prefix_divisible_by_5; +mod s0201_bitwise_and_of_numbers_range; +mod s0109_convert_sorted_list_to_binary_search_tree; +mod s0101_symmetric_tree; +mod s0098_validate_binary_search_tree; +mod s0035_search_insert_position; +mod s0050_powx_n; +mod s0198_house_robber; +mod s0004_median_of_two_sorted_arrays; +mod s0221_maximal_square; +mod s0047_permutations_ii; +mod s0172_factorial_trailing_zeroes; +mod s0054_spiral_matrix; +mod s0053_maximum_subarray; +mod s1046_last_stone_weight; +mod s0146_lru_cache; +mod s0126_word_ladder_ii; +mod s0242_valid_anagram; +mod s0112_path_sum; +mod s0023_merge_k_sorted_lists; +mod s0230_kth_smallest_element_in_a_bst; +mod s0104_maximum_depth_of_binary_tree; +mod s0258_add_digits; +mod s0187_repeated_dna_sequences; +mod s0025_reverse_nodes_in_k_group; +mod s0039_combination_sum; +mod s0107_binary_tree_level_order_traversal_ii; +mod s0091_decode_ways; +mod s0056_merge_intervals; +mod s0065_valid_number; +mod s0016_3sum_closest; +mod s0096_unique_binary_search_trees; +mod s0072_edit_distance; +mod s0044_wildcard_matching; +mod s0239_sliding_window_maximum; +mod s0174_dungeon_game; +mod s0073_set_matrix_zeroes; +mod s0078_subsets; +mod s0037_sudoku_solver; +mod s0033_search_in_rotated_sorted_array; +mod s0002_add_two_numbers; +mod s0313_super_ugly_number; +mod s0068_text_justification; +mod s0064_minimum_path_sum; +mod s0218_the_skyline_problem; +mod s0125_valid_palindrome; +mod s0210_course_schedule_ii; +mod s0143_reorder_list; +mod s0164_maximum_gap; +mod s0097_interleaving_string; +mod s0105_construct_binary_tree_from_preorder_and_inorder_traversal; +mod s0167_two_sum_ii_input_array_is_sorted; +mod s0034_find_first_and_last_position_of_element_in_sorted_array; +mod s0094_binary_tree_inorder_traversal; +mod s0052_n_queens_ii; +mod s0121_best_time_to_buy_and_sell_stock; +mod s0273_integer_to_english_words; +mod s0225_implement_stack_using_queues; +mod s0046_permutations; +mod s0085_maximal_rectangle; +mod s0135_candy; +mod s0113_path_sum_ii; +mod s0029_divide_two_integers; +mod s0260_single_number_iii; +mod s0140_word_break_ii; +mod s0149_max_points_on_a_line; +mod s0213_house_robber_ii; +mod s0222_count_complete_tree_nodes; +mod s0134_gas_station; +mod s0057_insert_interval; +mod s0173_binary_search_tree_iterator; +mod s0077_combinations; +mod s0005_longest_palindromic_substring; +mod s0041_first_missing_positive; +mod s0026_remove_duplicates_from_sorted_array; +mod s0166_fraction_to_recurring_decimal; +mod s0119_pascals_triangle_ii; +mod s0012_integer_to_roman; +mod s0223_rectangle_area; +mod s0229_majority_element_ii; +mod s0061_rotate_list; +mod s0123_best_time_to_buy_and_sell_stock_iii; +mod s0301_remove_invalid_parentheses; +mod s0067_add_binary; +mod s0049_group_anagrams; +mod s0189_rotate_array; +mod s0001_two_sum; +mod s0275_h_index_ii; +mod s0103_binary_tree_zigzag_level_order_traversal; +mod s0137_single_number_ii; +mod s0208_implement_trie_prefix_tree; +mod s0300_longest_increasing_subsequence; +mod s0118_pascals_triangle; +mod s0010_regular_expression_matching; +mod s0013_roman_to_integer; +mod s0209_minimum_size_subarray_sum; +mod s0227_basic_calculator_ii; +mod s0022_generate_parentheses; +mod s0008_string_to_integer_atoi; +mod s0152_maximum_product_subarray; +mod s0014_longest_common_prefix; +mod s0070_climbing_stairs; +mod s0233_number_of_digit_one; +mod s0154_find_minimum_in_rotated_sorted_array_ii; +mod s0127_word_ladder; +mod s0207_course_schedule; +mod s0263_ugly_number; +mod s0295_find_median_from_data_stream; +mod s0148_sort_list; +mod s0257_binary_tree_paths; +mod s0120_triangle; +mod s0309_best_time_to_buy_and_sell_stock_with_cooldown; +mod s0074_search_a_2d_matrix; +mod s0215_kth_largest_element_in_an_array; +mod s0203_remove_linked_list_elements; +mod s0081_search_in_rotated_sorted_array_ii; +mod s0059_spiral_matrix_ii; +mod s0151_reverse_words_in_a_string; +mod s0205_isomorphic_strings; +mod s0179_largest_number; +mod s0168_excel_sheet_column_title; +mod s0007_reverse_integer; +mod s0032_longest_valid_parentheses; +mod s0165_compare_version_numbers; +mod s0031_next_permutation; +mod s0088_merge_sorted_array; +mod s0509_fibonacci_number; +mod s0036_valid_sudoku; +mod s0069_sqrtx; +mod s0211_add_and_search_word_data_structure_design; +mod s0114_flatten_binary_tree_to_linked_list; +mod s0224_basic_calculator; +mod s0045_jump_game_ii; +mod s0051_n_queens; +mod s0212_word_search_ii; +mod s0287_find_the_duplicate_number; +mod s0153_find_minimum_in_rotated_sorted_array; +mod s0289_game_of_life; +mod s0200_number_of_islands; +mod s0015_3sum; +mod s0216_combination_sum_iii; +mod s0043_multiply_strings; +mod s0090_subsets_ii; +mod s0003_longest_substring; +mod s0139_word_break; +mod s0150_evaluate_reverse_polish_notation; +mod s0063_unique_paths_ii; +mod s0062_unique_paths; +mod s0199_binary_tree_right_side_view; +mod s0282_expression_add_operators; +mod s0021_merge_two_sorted_lists; +mod s0129_sum_root_to_leaf_numbers; +mod s0206_reverse_linked_list; +mod s0131_palindrome_partitioning; +mod s0307_range_sum_query_mutable; +mod s0111_minimum_depth_of_binary_tree; +mod s0092_reverse_linked_list_ii; +mod s0303_range_sum_query_immutable; +mod s0102_binary_tree_level_order_traversal; diff --git a/src/n0001_two_sum.rs b/src/solution/s0001_two_sum.rs similarity index 100% rename from src/n0001_two_sum.rs rename to src/solution/s0001_two_sum.rs diff --git a/src/n0002_add_two_numbers.rs b/src/solution/s0002_add_two_numbers.rs similarity index 98% rename from src/n0002_add_two_numbers.rs rename to src/solution/s0002_add_two_numbers.rs index b7b21b01..5612c3d4 100644 --- a/src/n0002_add_two_numbers.rs +++ b/src/solution/s0002_add_two_numbers.rs @@ -17,7 +17,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0003_longest_substring.rs b/src/solution/s0003_longest_substring.rs similarity index 100% rename from src/n0003_longest_substring.rs rename to src/solution/s0003_longest_substring.rs diff --git a/src/n0004_median_of_two_sorted_arrays.rs b/src/solution/s0004_median_of_two_sorted_arrays.rs similarity index 100% rename from src/n0004_median_of_two_sorted_arrays.rs rename to src/solution/s0004_median_of_two_sorted_arrays.rs diff --git a/src/n0005_longest_palindromic_substring.rs b/src/solution/s0005_longest_palindromic_substring.rs similarity index 100% rename from src/n0005_longest_palindromic_substring.rs rename to src/solution/s0005_longest_palindromic_substring.rs diff --git a/src/n0006_zigzag_conversion.rs b/src/solution/s0006_zigzag_conversion.rs similarity index 100% rename from src/n0006_zigzag_conversion.rs rename to src/solution/s0006_zigzag_conversion.rs diff --git a/src/n0007_reverse_integer.rs b/src/solution/s0007_reverse_integer.rs similarity index 100% rename from src/n0007_reverse_integer.rs rename to src/solution/s0007_reverse_integer.rs diff --git a/src/n0008_string_to_integer_atoi.rs b/src/solution/s0008_string_to_integer_atoi.rs similarity index 100% rename from src/n0008_string_to_integer_atoi.rs rename to src/solution/s0008_string_to_integer_atoi.rs diff --git a/src/n0009_palindrome_number.rs b/src/solution/s0009_palindrome_number.rs similarity index 100% rename from src/n0009_palindrome_number.rs rename to src/solution/s0009_palindrome_number.rs diff --git a/src/n0010_regular_expression_matching.rs b/src/solution/s0010_regular_expression_matching.rs similarity index 100% rename from src/n0010_regular_expression_matching.rs rename to src/solution/s0010_regular_expression_matching.rs diff --git a/src/n0011_container_with_most_water.rs b/src/solution/s0011_container_with_most_water.rs similarity index 100% rename from src/n0011_container_with_most_water.rs rename to src/solution/s0011_container_with_most_water.rs diff --git a/src/n0012_integer_to_roman.rs b/src/solution/s0012_integer_to_roman.rs similarity index 100% rename from src/n0012_integer_to_roman.rs rename to src/solution/s0012_integer_to_roman.rs diff --git a/src/n0013_roman_to_integer.rs b/src/solution/s0013_roman_to_integer.rs similarity index 100% rename from src/n0013_roman_to_integer.rs rename to src/solution/s0013_roman_to_integer.rs diff --git a/src/n0014_longest_common_prefix.rs b/src/solution/s0014_longest_common_prefix.rs similarity index 100% rename from src/n0014_longest_common_prefix.rs rename to src/solution/s0014_longest_common_prefix.rs diff --git a/src/n0015_3sum.rs b/src/solution/s0015_3sum.rs similarity index 100% rename from src/n0015_3sum.rs rename to src/solution/s0015_3sum.rs diff --git a/src/n0016_3sum_closest.rs b/src/solution/s0016_3sum_closest.rs similarity index 100% rename from src/n0016_3sum_closest.rs rename to src/solution/s0016_3sum_closest.rs diff --git a/src/n0017_letter_combinations_of_a_phone_number.rs b/src/solution/s0017_letter_combinations_of_a_phone_number.rs similarity index 100% rename from src/n0017_letter_combinations_of_a_phone_number.rs rename to src/solution/s0017_letter_combinations_of_a_phone_number.rs diff --git a/src/n0018_4sum.rs b/src/solution/s0018_4sum.rs similarity index 100% rename from src/n0018_4sum.rs rename to src/solution/s0018_4sum.rs diff --git a/src/n0019_remove_nth_node_from_end_of_list.rs b/src/solution/s0019_remove_nth_node_from_end_of_list.rs similarity index 97% rename from src/n0019_remove_nth_node_from_end_of_list.rs rename to src/solution/s0019_remove_nth_node_from_end_of_list.rs index a1698a45..b3dac826 100644 --- a/src/n0019_remove_nth_node_from_end_of_list.rs +++ b/src/solution/s0019_remove_nth_node_from_end_of_list.rs @@ -21,7 +21,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0020_valid_parentheses.rs b/src/solution/s0020_valid_parentheses.rs similarity index 100% rename from src/n0020_valid_parentheses.rs rename to src/solution/s0020_valid_parentheses.rs diff --git a/src/n0021_merge_two_sorted_lists.rs b/src/solution/s0021_merge_two_sorted_lists.rs similarity index 97% rename from src/n0021_merge_two_sorted_lists.rs rename to src/solution/s0021_merge_two_sorted_lists.rs index 5a25adf7..c496d8e0 100644 --- a/src/n0021_merge_two_sorted_lists.rs +++ b/src/solution/s0021_merge_two_sorted_lists.rs @@ -11,7 +11,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0022_generate_parentheses.rs b/src/solution/s0022_generate_parentheses.rs similarity index 100% rename from src/n0022_generate_parentheses.rs rename to src/solution/s0022_generate_parentheses.rs diff --git a/src/n0023_merge_k_sorted_lists.rs b/src/solution/s0023_merge_k_sorted_lists.rs similarity index 97% rename from src/n0023_merge_k_sorted_lists.rs rename to src/solution/s0023_merge_k_sorted_lists.rs index 74b95045..c213eb7d 100644 --- a/src/n0023_merge_k_sorted_lists.rs +++ b/src/solution/s0023_merge_k_sorted_lists.rs @@ -17,7 +17,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here use std::cmp::Ordering; diff --git a/src/n0024_swap_nodes_in_pairs.rs b/src/solution/s0024_swap_nodes_in_pairs.rs similarity index 97% rename from src/n0024_swap_nodes_in_pairs.rs rename to src/solution/s0024_swap_nodes_in_pairs.rs index 41e3c6c4..104d6b9e 100644 --- a/src/n0024_swap_nodes_in_pairs.rs +++ b/src/solution/s0024_swap_nodes_in_pairs.rs @@ -17,7 +17,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0025_reverse_nodes_in_k_group.rs b/src/solution/s0025_reverse_nodes_in_k_group.rs similarity index 98% rename from src/n0025_reverse_nodes_in_k_group.rs rename to src/solution/s0025_reverse_nodes_in_k_group.rs index aac987f7..3beb5528 100644 --- a/src/n0025_reverse_nodes_in_k_group.rs +++ b/src/solution/s0025_reverse_nodes_in_k_group.rs @@ -25,7 +25,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0026_remove_duplicates_from_sorted_array.rs b/src/solution/s0026_remove_duplicates_from_sorted_array.rs similarity index 100% rename from src/n0026_remove_duplicates_from_sorted_array.rs rename to src/solution/s0026_remove_duplicates_from_sorted_array.rs diff --git a/src/n0027_remove_element.rs b/src/solution/s0027_remove_element.rs similarity index 100% rename from src/n0027_remove_element.rs rename to src/solution/s0027_remove_element.rs diff --git a/src/n0028_implement_strstr.rs b/src/solution/s0028_implement_strstr.rs similarity index 100% rename from src/n0028_implement_strstr.rs rename to src/solution/s0028_implement_strstr.rs diff --git a/src/n0029_divide_two_integers.rs b/src/solution/s0029_divide_two_integers.rs similarity index 100% rename from src/n0029_divide_two_integers.rs rename to src/solution/s0029_divide_two_integers.rs diff --git a/src/n0030_substring_with_concatenation_of_all_words.rs b/src/solution/s0030_substring_with_concatenation_of_all_words.rs similarity index 100% rename from src/n0030_substring_with_concatenation_of_all_words.rs rename to src/solution/s0030_substring_with_concatenation_of_all_words.rs diff --git a/src/n0031_next_permutation.rs b/src/solution/s0031_next_permutation.rs similarity index 100% rename from src/n0031_next_permutation.rs rename to src/solution/s0031_next_permutation.rs diff --git a/src/n0032_longest_valid_parentheses.rs b/src/solution/s0032_longest_valid_parentheses.rs similarity index 100% rename from src/n0032_longest_valid_parentheses.rs rename to src/solution/s0032_longest_valid_parentheses.rs diff --git a/src/n0033_search_in_rotated_sorted_array.rs b/src/solution/s0033_search_in_rotated_sorted_array.rs similarity index 100% rename from src/n0033_search_in_rotated_sorted_array.rs rename to src/solution/s0033_search_in_rotated_sorted_array.rs diff --git a/src/n0034_find_first_and_last_position_of_element_in_sorted_array.rs b/src/solution/s0034_find_first_and_last_position_of_element_in_sorted_array.rs similarity index 100% rename from src/n0034_find_first_and_last_position_of_element_in_sorted_array.rs rename to src/solution/s0034_find_first_and_last_position_of_element_in_sorted_array.rs diff --git a/src/n0035_search_insert_position.rs b/src/solution/s0035_search_insert_position.rs similarity index 100% rename from src/n0035_search_insert_position.rs rename to src/solution/s0035_search_insert_position.rs diff --git a/src/n0036_valid_sudoku.rs b/src/solution/s0036_valid_sudoku.rs similarity index 100% rename from src/n0036_valid_sudoku.rs rename to src/solution/s0036_valid_sudoku.rs diff --git a/src/n0037_sudoku_solver.rs b/src/solution/s0037_sudoku_solver.rs similarity index 100% rename from src/n0037_sudoku_solver.rs rename to src/solution/s0037_sudoku_solver.rs diff --git a/src/n0038_count_and_say.rs b/src/solution/s0038_count_and_say.rs similarity index 100% rename from src/n0038_count_and_say.rs rename to src/solution/s0038_count_and_say.rs diff --git a/src/n0039_combination_sum.rs b/src/solution/s0039_combination_sum.rs similarity index 100% rename from src/n0039_combination_sum.rs rename to src/solution/s0039_combination_sum.rs diff --git a/src/n0040_combination_sum_ii.rs b/src/solution/s0040_combination_sum_ii.rs similarity index 100% rename from src/n0040_combination_sum_ii.rs rename to src/solution/s0040_combination_sum_ii.rs diff --git a/src/n0041_first_missing_positive.rs b/src/solution/s0041_first_missing_positive.rs similarity index 100% rename from src/n0041_first_missing_positive.rs rename to src/solution/s0041_first_missing_positive.rs diff --git a/src/n0042_trapping_rain_water.rs b/src/solution/s0042_trapping_rain_water.rs similarity index 100% rename from src/n0042_trapping_rain_water.rs rename to src/solution/s0042_trapping_rain_water.rs diff --git a/src/n0043_multiply_strings.rs b/src/solution/s0043_multiply_strings.rs similarity index 100% rename from src/n0043_multiply_strings.rs rename to src/solution/s0043_multiply_strings.rs diff --git a/src/n0044_wildcard_matching.rs b/src/solution/s0044_wildcard_matching.rs similarity index 100% rename from src/n0044_wildcard_matching.rs rename to src/solution/s0044_wildcard_matching.rs diff --git a/src/n0045_jump_game_ii.rs b/src/solution/s0045_jump_game_ii.rs similarity index 100% rename from src/n0045_jump_game_ii.rs rename to src/solution/s0045_jump_game_ii.rs diff --git a/src/n0046_permutations.rs b/src/solution/s0046_permutations.rs similarity index 100% rename from src/n0046_permutations.rs rename to src/solution/s0046_permutations.rs diff --git a/src/n0047_permutations_ii.rs b/src/solution/s0047_permutations_ii.rs similarity index 100% rename from src/n0047_permutations_ii.rs rename to src/solution/s0047_permutations_ii.rs diff --git a/src/n0048_rotate_image.rs b/src/solution/s0048_rotate_image.rs similarity index 100% rename from src/n0048_rotate_image.rs rename to src/solution/s0048_rotate_image.rs diff --git a/src/n0049_group_anagrams.rs b/src/solution/s0049_group_anagrams.rs similarity index 100% rename from src/n0049_group_anagrams.rs rename to src/solution/s0049_group_anagrams.rs diff --git a/src/n0050_powx_n.rs b/src/solution/s0050_powx_n.rs similarity index 100% rename from src/n0050_powx_n.rs rename to src/solution/s0050_powx_n.rs diff --git a/src/n0051_n_queens.rs b/src/solution/s0051_n_queens.rs similarity index 100% rename from src/n0051_n_queens.rs rename to src/solution/s0051_n_queens.rs diff --git a/src/n0052_n_queens_ii.rs b/src/solution/s0052_n_queens_ii.rs similarity index 100% rename from src/n0052_n_queens_ii.rs rename to src/solution/s0052_n_queens_ii.rs diff --git a/src/n0053_maximum_subarray.rs b/src/solution/s0053_maximum_subarray.rs similarity index 100% rename from src/n0053_maximum_subarray.rs rename to src/solution/s0053_maximum_subarray.rs diff --git a/src/n0054_spiral_matrix.rs b/src/solution/s0054_spiral_matrix.rs similarity index 100% rename from src/n0054_spiral_matrix.rs rename to src/solution/s0054_spiral_matrix.rs diff --git a/src/n0055_jump_game.rs b/src/solution/s0055_jump_game.rs similarity index 100% rename from src/n0055_jump_game.rs rename to src/solution/s0055_jump_game.rs diff --git a/src/n0056_merge_intervals.rs b/src/solution/s0056_merge_intervals.rs similarity index 100% rename from src/n0056_merge_intervals.rs rename to src/solution/s0056_merge_intervals.rs diff --git a/src/n0057_insert_interval.rs b/src/solution/s0057_insert_interval.rs similarity index 100% rename from src/n0057_insert_interval.rs rename to src/solution/s0057_insert_interval.rs diff --git a/src/n0058_length_of_last_word.rs b/src/solution/s0058_length_of_last_word.rs similarity index 100% rename from src/n0058_length_of_last_word.rs rename to src/solution/s0058_length_of_last_word.rs diff --git a/src/n0059_spiral_matrix_ii.rs b/src/solution/s0059_spiral_matrix_ii.rs similarity index 100% rename from src/n0059_spiral_matrix_ii.rs rename to src/solution/s0059_spiral_matrix_ii.rs diff --git a/src/n0060_permutation_sequence.rs b/src/solution/s0060_permutation_sequence.rs similarity index 100% rename from src/n0060_permutation_sequence.rs rename to src/solution/s0060_permutation_sequence.rs diff --git a/src/n0061_rotate_list.rs b/src/solution/s0061_rotate_list.rs similarity index 94% rename from src/n0061_rotate_list.rs rename to src/solution/s0061_rotate_list.rs index 08812115..b7723576 100644 --- a/src/n0061_rotate_list.rs +++ b/src/solution/s0061_rotate_list.rs @@ -26,7 +26,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0062_unique_paths.rs b/src/solution/s0062_unique_paths.rs similarity index 100% rename from src/n0062_unique_paths.rs rename to src/solution/s0062_unique_paths.rs diff --git a/src/n0063_unique_paths_ii.rs b/src/solution/s0063_unique_paths_ii.rs similarity index 100% rename from src/n0063_unique_paths_ii.rs rename to src/solution/s0063_unique_paths_ii.rs diff --git a/src/n0064_minimum_path_sum.rs b/src/solution/s0064_minimum_path_sum.rs similarity index 100% rename from src/n0064_minimum_path_sum.rs rename to src/solution/s0064_minimum_path_sum.rs diff --git a/src/n0065_valid_number.rs b/src/solution/s0065_valid_number.rs similarity index 100% rename from src/n0065_valid_number.rs rename to src/solution/s0065_valid_number.rs diff --git a/src/n0066_plus_one.rs b/src/solution/s0066_plus_one.rs similarity index 100% rename from src/n0066_plus_one.rs rename to src/solution/s0066_plus_one.rs diff --git a/src/n0067_add_binary.rs b/src/solution/s0067_add_binary.rs similarity index 100% rename from src/n0067_add_binary.rs rename to src/solution/s0067_add_binary.rs diff --git a/src/n0068_text_justification.rs b/src/solution/s0068_text_justification.rs similarity index 100% rename from src/n0068_text_justification.rs rename to src/solution/s0068_text_justification.rs diff --git a/src/n0069_sqrtx.rs b/src/solution/s0069_sqrtx.rs similarity index 100% rename from src/n0069_sqrtx.rs rename to src/solution/s0069_sqrtx.rs diff --git a/src/n0070_climbing_stairs.rs b/src/solution/s0070_climbing_stairs.rs similarity index 100% rename from src/n0070_climbing_stairs.rs rename to src/solution/s0070_climbing_stairs.rs diff --git a/src/n0071_simplify_path.rs b/src/solution/s0071_simplify_path.rs similarity index 100% rename from src/n0071_simplify_path.rs rename to src/solution/s0071_simplify_path.rs diff --git a/src/n0072_edit_distance.rs b/src/solution/s0072_edit_distance.rs similarity index 100% rename from src/n0072_edit_distance.rs rename to src/solution/s0072_edit_distance.rs diff --git a/src/n0073_set_matrix_zeroes.rs b/src/solution/s0073_set_matrix_zeroes.rs similarity index 100% rename from src/n0073_set_matrix_zeroes.rs rename to src/solution/s0073_set_matrix_zeroes.rs diff --git a/src/n0074_search_a_2d_matrix.rs b/src/solution/s0074_search_a_2d_matrix.rs similarity index 100% rename from src/n0074_search_a_2d_matrix.rs rename to src/solution/s0074_search_a_2d_matrix.rs diff --git a/src/n0075_sort_colors.rs b/src/solution/s0075_sort_colors.rs similarity index 100% rename from src/n0075_sort_colors.rs rename to src/solution/s0075_sort_colors.rs diff --git a/src/n0076_minimum_window_substring.rs b/src/solution/s0076_minimum_window_substring.rs similarity index 100% rename from src/n0076_minimum_window_substring.rs rename to src/solution/s0076_minimum_window_substring.rs diff --git a/src/n0077_combinations.rs b/src/solution/s0077_combinations.rs similarity index 100% rename from src/n0077_combinations.rs rename to src/solution/s0077_combinations.rs diff --git a/src/n0078_subsets.rs b/src/solution/s0078_subsets.rs similarity index 100% rename from src/n0078_subsets.rs rename to src/solution/s0078_subsets.rs diff --git a/src/n0079_word_search.rs b/src/solution/s0079_word_search.rs similarity index 100% rename from src/n0079_word_search.rs rename to src/solution/s0079_word_search.rs diff --git a/src/n0080_remove_duplicates_from_sorted_array_ii.rs b/src/solution/s0080_remove_duplicates_from_sorted_array_ii.rs similarity index 100% rename from src/n0080_remove_duplicates_from_sorted_array_ii.rs rename to src/solution/s0080_remove_duplicates_from_sorted_array_ii.rs diff --git a/src/n0081_search_in_rotated_sorted_array_ii.rs b/src/solution/s0081_search_in_rotated_sorted_array_ii.rs similarity index 100% rename from src/n0081_search_in_rotated_sorted_array_ii.rs rename to src/solution/s0081_search_in_rotated_sorted_array_ii.rs diff --git a/src/n0082_remove_duplicates_from_sorted_list_ii.rs b/src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs similarity index 94% rename from src/n0082_remove_duplicates_from_sorted_list_ii.rs rename to src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs index ff8c8b8b..d04b15f8 100644 --- a/src/n0082_remove_duplicates_from_sorted_list_ii.rs +++ b/src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs @@ -19,7 +19,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0083_remove_duplicates_from_sorted_list.rs b/src/solution/s0083_remove_duplicates_from_sorted_list.rs similarity index 94% rename from src/n0083_remove_duplicates_from_sorted_list.rs rename to src/solution/s0083_remove_duplicates_from_sorted_list.rs index b8fa539f..785cc03f 100644 --- a/src/n0083_remove_duplicates_from_sorted_list.rs +++ b/src/solution/s0083_remove_duplicates_from_sorted_list.rs @@ -19,7 +19,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0084_largest_rectangle_in_histogram.rs b/src/solution/s0084_largest_rectangle_in_histogram.rs similarity index 100% rename from src/n0084_largest_rectangle_in_histogram.rs rename to src/solution/s0084_largest_rectangle_in_histogram.rs diff --git a/src/n0085_maximal_rectangle.rs b/src/solution/s0085_maximal_rectangle.rs similarity index 100% rename from src/n0085_maximal_rectangle.rs rename to src/solution/s0085_maximal_rectangle.rs diff --git a/src/n0086_partition_list.rs b/src/solution/s0086_partition_list.rs similarity index 97% rename from src/n0086_partition_list.rs rename to src/solution/s0086_partition_list.rs index ad03b081..4238586f 100644 --- a/src/n0086_partition_list.rs +++ b/src/solution/s0086_partition_list.rs @@ -14,7 +14,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; impl Solution { pub fn partition(head: Option>, x: i32) -> Option> { diff --git a/src/n0087_scramble_string.rs b/src/solution/s0087_scramble_string.rs similarity index 100% rename from src/n0087_scramble_string.rs rename to src/solution/s0087_scramble_string.rs diff --git a/src/n0088_merge_sorted_array.rs b/src/solution/s0088_merge_sorted_array.rs similarity index 100% rename from src/n0088_merge_sorted_array.rs rename to src/solution/s0088_merge_sorted_array.rs diff --git a/src/n0089_gray_code.rs b/src/solution/s0089_gray_code.rs similarity index 100% rename from src/n0089_gray_code.rs rename to src/solution/s0089_gray_code.rs diff --git a/src/n0090_subsets_ii.rs b/src/solution/s0090_subsets_ii.rs similarity index 100% rename from src/n0090_subsets_ii.rs rename to src/solution/s0090_subsets_ii.rs diff --git a/src/n0091_decode_ways.rs b/src/solution/s0091_decode_ways.rs similarity index 100% rename from src/n0091_decode_ways.rs rename to src/solution/s0091_decode_ways.rs diff --git a/src/n0092_reverse_linked_list_ii.rs b/src/solution/s0092_reverse_linked_list_ii.rs similarity index 94% rename from src/n0092_reverse_linked_list_ii.rs rename to src/solution/s0092_reverse_linked_list_ii.rs index 705a7875..e84035da 100644 --- a/src/n0092_reverse_linked_list_ii.rs +++ b/src/solution/s0092_reverse_linked_list_ii.rs @@ -14,7 +14,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0093_restore_ip_addresses.rs b/src/solution/s0093_restore_ip_addresses.rs similarity index 100% rename from src/n0093_restore_ip_addresses.rs rename to src/solution/s0093_restore_ip_addresses.rs diff --git a/src/n0094_binary_tree_inorder_traversal.rs b/src/solution/s0094_binary_tree_inorder_traversal.rs similarity index 96% rename from src/n0094_binary_tree_inorder_traversal.rs rename to src/solution/s0094_binary_tree_inorder_traversal.rs index c40cd1c8..d4d2ea2a 100644 --- a/src/n0094_binary_tree_inorder_traversal.rs +++ b/src/solution/s0094_binary_tree_inorder_traversal.rs @@ -22,7 +22,7 @@ pub struct Solution {} // submission codes start here -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; use std::cell::RefCell; use std::rc::Rc; impl Solution { diff --git a/src/n0095_unique_binary_search_trees_ii.rs b/src/solution/s0095_unique_binary_search_trees_ii.rs similarity index 97% rename from src/n0095_unique_binary_search_trees_ii.rs rename to src/solution/s0095_unique_binary_search_trees_ii.rs index 3ab366e4..ffdc763b 100644 --- a/src/n0095_unique_binary_search_trees_ii.rs +++ b/src/solution/s0095_unique_binary_search_trees_ii.rs @@ -48,7 +48,7 @@ pub struct Solution {} / \ 2 4 */ -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; use std::cell::RefCell; use std::rc::Rc; impl Solution { diff --git a/src/n0096_unique_binary_search_trees.rs b/src/solution/s0096_unique_binary_search_trees.rs similarity index 100% rename from src/n0096_unique_binary_search_trees.rs rename to src/solution/s0096_unique_binary_search_trees.rs diff --git a/src/n0097_interleaving_string.rs b/src/solution/s0097_interleaving_string.rs similarity index 100% rename from src/n0097_interleaving_string.rs rename to src/solution/s0097_interleaving_string.rs diff --git a/src/n0098_validate_binary_search_tree.rs b/src/solution/s0098_validate_binary_search_tree.rs similarity index 98% rename from src/n0098_validate_binary_search_tree.rs rename to src/solution/s0098_validate_binary_search_tree.rs index fcb359ee..7f55a47e 100644 --- a/src/n0098_validate_binary_search_tree.rs +++ b/src/solution/s0098_validate_binary_search_tree.rs @@ -40,7 +40,7 @@ pub struct Solution {} // submission codes start here // Definition for a binary tree node. -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; use std::cell::RefCell; use std::rc::Rc; diff --git a/src/n0099_recover_binary_search_tree.rs b/src/solution/s0099_recover_binary_search_tree.rs similarity index 95% rename from src/n0099_recover_binary_search_tree.rs rename to src/solution/s0099_recover_binary_search_tree.rs index 8bc39b3d..3b92da04 100644 --- a/src/n0099_recover_binary_search_tree.rs +++ b/src/solution/s0099_recover_binary_search_tree.rs @@ -55,7 +55,7 @@ */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0100_same_tree.rs b/src/solution/s0100_same_tree.rs similarity index 96% rename from src/n0100_same_tree.rs rename to src/solution/s0100_same_tree.rs index 51b7ad79..f1ca1972 100644 --- a/src/n0100_same_tree.rs +++ b/src/solution/s0100_same_tree.rs @@ -44,7 +44,7 @@ */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here use std::cell::RefCell; use std::rc::Rc; diff --git a/src/n0101_symmetric_tree.rs b/src/solution/s0101_symmetric_tree.rs similarity index 97% rename from src/n0101_symmetric_tree.rs rename to src/solution/s0101_symmetric_tree.rs index d341ff34..c62962d2 100644 --- a/src/n0101_symmetric_tree.rs +++ b/src/solution/s0101_symmetric_tree.rs @@ -30,7 +30,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0102_binary_tree_level_order_traversal.rs b/src/solution/s0102_binary_tree_level_order_traversal.rs similarity index 97% rename from src/n0102_binary_tree_level_order_traversal.rs rename to src/solution/s0102_binary_tree_level_order_traversal.rs index 6fdabf6e..42f782a5 100644 --- a/src/n0102_binary_tree_level_order_traversal.rs +++ b/src/solution/s0102_binary_tree_level_order_traversal.rs @@ -26,7 +26,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0103_binary_tree_zigzag_level_order_traversal.rs b/src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs similarity index 97% rename from src/n0103_binary_tree_zigzag_level_order_traversal.rs rename to src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs index ce31b6b8..96476fda 100644 --- a/src/n0103_binary_tree_zigzag_level_order_traversal.rs +++ b/src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs @@ -26,7 +26,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0104_maximum_depth_of_binary_tree.rs b/src/solution/s0104_maximum_depth_of_binary_tree.rs similarity index 96% rename from src/n0104_maximum_depth_of_binary_tree.rs rename to src/solution/s0104_maximum_depth_of_binary_tree.rs index c5faf233..6d2f18e6 100644 --- a/src/n0104_maximum_depth_of_binary_tree.rs +++ b/src/solution/s0104_maximum_depth_of_binary_tree.rs @@ -22,7 +22,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs b/src/solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs similarity index 97% rename from src/n0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs rename to src/solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs index 611725de..e271faa5 100644 --- a/src/n0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs +++ b/src/solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs @@ -23,7 +23,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs b/src/solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs similarity index 97% rename from src/n0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs rename to src/solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs index 7d3e820c..63c469be 100644 --- a/src/n0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs +++ b/src/solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs @@ -24,7 +24,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0107_binary_tree_level_order_traversal_ii.rs b/src/solution/s0107_binary_tree_level_order_traversal_ii.rs similarity index 97% rename from src/n0107_binary_tree_level_order_traversal_ii.rs rename to src/solution/s0107_binary_tree_level_order_traversal_ii.rs index 42855964..f77229a6 100644 --- a/src/n0107_binary_tree_level_order_traversal_ii.rs +++ b/src/solution/s0107_binary_tree_level_order_traversal_ii.rs @@ -26,7 +26,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0108_convert_sorted_array_to_binary_search_tree.rs b/src/solution/s0108_convert_sorted_array_to_binary_search_tree.rs similarity index 97% rename from src/n0108_convert_sorted_array_to_binary_search_tree.rs rename to src/solution/s0108_convert_sorted_array_to_binary_search_tree.rs index 4da33781..67e4b2ac 100644 --- a/src/n0108_convert_sorted_array_to_binary_search_tree.rs +++ b/src/solution/s0108_convert_sorted_array_to_binary_search_tree.rs @@ -21,7 +21,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0109_convert_sorted_list_to_binary_search_tree.rs b/src/solution/s0109_convert_sorted_list_to_binary_search_tree.rs similarity index 94% rename from src/n0109_convert_sorted_list_to_binary_search_tree.rs rename to src/solution/s0109_convert_sorted_list_to_binary_search_tree.rs index 072c6eac..6bb37b0e 100644 --- a/src/n0109_convert_sorted_list_to_binary_search_tree.rs +++ b/src/solution/s0109_convert_sorted_list_to_binary_search_tree.rs @@ -21,8 +21,8 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; -use super::util::tree::{to_tree, TreeNode}; +use crate::util::linked_list::{to_list, ListNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0110_balanced_binary_tree.rs b/src/solution/s0110_balanced_binary_tree.rs similarity index 93% rename from src/n0110_balanced_binary_tree.rs rename to src/solution/s0110_balanced_binary_tree.rs index 68e1b2ad..bb067d02 100644 --- a/src/n0110_balanced_binary_tree.rs +++ b/src/solution/s0110_balanced_binary_tree.rs @@ -40,7 +40,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0111_minimum_depth_of_binary_tree.rs b/src/solution/s0111_minimum_depth_of_binary_tree.rs similarity index 96% rename from src/n0111_minimum_depth_of_binary_tree.rs rename to src/solution/s0111_minimum_depth_of_binary_tree.rs index f537c316..1efb759d 100644 --- a/src/n0111_minimum_depth_of_binary_tree.rs +++ b/src/solution/s0111_minimum_depth_of_binary_tree.rs @@ -22,7 +22,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0112_path_sum.rs b/src/solution/s0112_path_sum.rs similarity index 97% rename from src/n0112_path_sum.rs rename to src/solution/s0112_path_sum.rs index 72e34da0..2f036b21 100644 --- a/src/n0112_path_sum.rs +++ b/src/solution/s0112_path_sum.rs @@ -23,7 +23,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0113_path_sum_ii.rs b/src/solution/s0113_path_sum_ii.rs similarity index 97% rename from src/n0113_path_sum_ii.rs rename to src/solution/s0113_path_sum_ii.rs index c9914e08..d567e693 100644 --- a/src/n0113_path_sum_ii.rs +++ b/src/solution/s0113_path_sum_ii.rs @@ -30,7 +30,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0114_flatten_binary_tree_to_linked_list.rs b/src/solution/s0114_flatten_binary_tree_to_linked_list.rs similarity index 97% rename from src/n0114_flatten_binary_tree_to_linked_list.rs rename to src/solution/s0114_flatten_binary_tree_to_linked_list.rs index 2b46cd42..9661e9e7 100644 --- a/src/n0114_flatten_binary_tree_to_linked_list.rs +++ b/src/solution/s0114_flatten_binary_tree_to_linked_list.rs @@ -31,7 +31,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0115_distinct_subsequences.rs b/src/solution/s0115_distinct_subsequences.rs similarity index 100% rename from src/n0115_distinct_subsequences.rs rename to src/solution/s0115_distinct_subsequences.rs diff --git a/src/n0118_pascals_triangle.rs b/src/solution/s0118_pascals_triangle.rs similarity index 100% rename from src/n0118_pascals_triangle.rs rename to src/solution/s0118_pascals_triangle.rs diff --git a/src/n0119_pascals_triangle_ii.rs b/src/solution/s0119_pascals_triangle_ii.rs similarity index 100% rename from src/n0119_pascals_triangle_ii.rs rename to src/solution/s0119_pascals_triangle_ii.rs diff --git a/src/n0120_triangle.rs b/src/solution/s0120_triangle.rs similarity index 100% rename from src/n0120_triangle.rs rename to src/solution/s0120_triangle.rs diff --git a/src/n0121_best_time_to_buy_and_sell_stock.rs b/src/solution/s0121_best_time_to_buy_and_sell_stock.rs similarity index 100% rename from src/n0121_best_time_to_buy_and_sell_stock.rs rename to src/solution/s0121_best_time_to_buy_and_sell_stock.rs diff --git a/src/n0122_best_time_to_buy_and_sell_stock_ii.rs b/src/solution/s0122_best_time_to_buy_and_sell_stock_ii.rs similarity index 100% rename from src/n0122_best_time_to_buy_and_sell_stock_ii.rs rename to src/solution/s0122_best_time_to_buy_and_sell_stock_ii.rs diff --git a/src/n0123_best_time_to_buy_and_sell_stock_iii.rs b/src/solution/s0123_best_time_to_buy_and_sell_stock_iii.rs similarity index 100% rename from src/n0123_best_time_to_buy_and_sell_stock_iii.rs rename to src/solution/s0123_best_time_to_buy_and_sell_stock_iii.rs diff --git a/src/n0124_binary_tree_maximum_path_sum.rs b/src/solution/s0124_binary_tree_maximum_path_sum.rs similarity index 98% rename from src/n0124_binary_tree_maximum_path_sum.rs rename to src/solution/s0124_binary_tree_maximum_path_sum.rs index 5517d18f..f76f3178 100644 --- a/src/n0124_binary_tree_maximum_path_sum.rs +++ b/src/solution/s0124_binary_tree_maximum_path_sum.rs @@ -33,7 +33,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0125_valid_palindrome.rs b/src/solution/s0125_valid_palindrome.rs similarity index 100% rename from src/n0125_valid_palindrome.rs rename to src/solution/s0125_valid_palindrome.rs diff --git a/src/n0126_word_ladder_ii.rs b/src/solution/s0126_word_ladder_ii.rs similarity index 100% rename from src/n0126_word_ladder_ii.rs rename to src/solution/s0126_word_ladder_ii.rs diff --git a/src/n0127_word_ladder.rs b/src/solution/s0127_word_ladder.rs similarity index 100% rename from src/n0127_word_ladder.rs rename to src/solution/s0127_word_ladder.rs diff --git a/src/n0128_longest_consecutive_sequence.rs b/src/solution/s0128_longest_consecutive_sequence.rs similarity index 100% rename from src/n0128_longest_consecutive_sequence.rs rename to src/solution/s0128_longest_consecutive_sequence.rs diff --git a/src/n0129_sum_root_to_leaf_numbers.rs b/src/solution/s0129_sum_root_to_leaf_numbers.rs similarity index 97% rename from src/n0129_sum_root_to_leaf_numbers.rs rename to src/solution/s0129_sum_root_to_leaf_numbers.rs index 5e423c34..c52dc94c 100644 --- a/src/n0129_sum_root_to_leaf_numbers.rs +++ b/src/solution/s0129_sum_root_to_leaf_numbers.rs @@ -40,7 +40,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0130_surrounded_regions.rs b/src/solution/s0130_surrounded_regions.rs similarity index 100% rename from src/n0130_surrounded_regions.rs rename to src/solution/s0130_surrounded_regions.rs diff --git a/src/n0131_palindrome_partitioning.rs b/src/solution/s0131_palindrome_partitioning.rs similarity index 100% rename from src/n0131_palindrome_partitioning.rs rename to src/solution/s0131_palindrome_partitioning.rs diff --git a/src/n0132_palindrome_partitioning_ii.rs b/src/solution/s0132_palindrome_partitioning_ii.rs similarity index 100% rename from src/n0132_palindrome_partitioning_ii.rs rename to src/solution/s0132_palindrome_partitioning_ii.rs diff --git a/src/n0134_gas_station.rs b/src/solution/s0134_gas_station.rs similarity index 100% rename from src/n0134_gas_station.rs rename to src/solution/s0134_gas_station.rs diff --git a/src/n0135_candy.rs b/src/solution/s0135_candy.rs similarity index 100% rename from src/n0135_candy.rs rename to src/solution/s0135_candy.rs diff --git a/src/n0136_single_number.rs b/src/solution/s0136_single_number.rs similarity index 100% rename from src/n0136_single_number.rs rename to src/solution/s0136_single_number.rs diff --git a/src/n0137_single_number_ii.rs b/src/solution/s0137_single_number_ii.rs similarity index 100% rename from src/n0137_single_number_ii.rs rename to src/solution/s0137_single_number_ii.rs diff --git a/src/n0139_word_break.rs b/src/solution/s0139_word_break.rs similarity index 100% rename from src/n0139_word_break.rs rename to src/solution/s0139_word_break.rs diff --git a/src/n0140_word_break_ii.rs b/src/solution/s0140_word_break_ii.rs similarity index 100% rename from src/n0140_word_break_ii.rs rename to src/solution/s0140_word_break_ii.rs diff --git a/src/n0143_reorder_list.rs b/src/solution/s0143_reorder_list.rs similarity index 93% rename from src/n0143_reorder_list.rs rename to src/solution/s0143_reorder_list.rs index 169c44d1..06ec32af 100644 --- a/src/n0143_reorder_list.rs +++ b/src/solution/s0143_reorder_list.rs @@ -19,7 +19,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0144_binary_tree_preorder_traversal.rs b/src/solution/s0144_binary_tree_preorder_traversal.rs similarity index 96% rename from src/n0144_binary_tree_preorder_traversal.rs rename to src/solution/s0144_binary_tree_preorder_traversal.rs index 951014c6..02ed1f7a 100644 --- a/src/n0144_binary_tree_preorder_traversal.rs +++ b/src/solution/s0144_binary_tree_preorder_traversal.rs @@ -20,7 +20,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0145_binary_tree_postorder_traversal.rs b/src/solution/s0145_binary_tree_postorder_traversal.rs similarity index 96% rename from src/n0145_binary_tree_postorder_traversal.rs rename to src/solution/s0145_binary_tree_postorder_traversal.rs index 66495658..2670b5bd 100644 --- a/src/n0145_binary_tree_postorder_traversal.rs +++ b/src/solution/s0145_binary_tree_postorder_traversal.rs @@ -20,7 +20,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0146_lru_cache.rs b/src/solution/s0146_lru_cache.rs similarity index 100% rename from src/n0146_lru_cache.rs rename to src/solution/s0146_lru_cache.rs diff --git a/src/n0147_insertion_sort_list.rs b/src/solution/s0147_insertion_sort_list.rs similarity index 96% rename from src/n0147_insertion_sort_list.rs rename to src/solution/s0147_insertion_sort_list.rs index edcd0787..cdcd2d69 100644 --- a/src/n0147_insertion_sort_list.rs +++ b/src/solution/s0147_insertion_sort_list.rs @@ -9,7 +9,7 @@ *
* A graphical example of insertion sort. The partial sorted list (black) initially contains only the first element in the list.
* With each iteration one element (red) is removed from the input data and inserted in-place into the sorted list

- * + * * *
    *
@@ -39,7 +39,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0148_sort_list.rs b/src/solution/s0148_sort_list.rs similarity index 98% rename from src/n0148_sort_list.rs rename to src/solution/s0148_sort_list.rs index 5fd6a8a2..4bc8ac17 100644 --- a/src/n0148_sort_list.rs +++ b/src/solution/s0148_sort_list.rs @@ -18,7 +18,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0149_max_points_on_a_line.rs b/src/solution/s0149_max_points_on_a_line.rs similarity index 95% rename from src/n0149_max_points_on_a_line.rs rename to src/solution/s0149_max_points_on_a_line.rs index dff94777..c2faf93b 100644 --- a/src/n0149_max_points_on_a_line.rs +++ b/src/solution/s0149_max_points_on_a_line.rs @@ -13,7 +13,7 @@ * | * | o * | o - * | o + * | o * +-------------> * 0 1 2 3 4 * @@ -36,7 +36,7 @@ * */ pub struct Solution {} -use super::util::point::Point; +use crate::util::point::Point; /* 要回顾下高中数学:已知两点, 求解一般式: diff --git a/src/n0150_evaluate_reverse_polish_notation.rs b/src/solution/s0150_evaluate_reverse_polish_notation.rs similarity index 100% rename from src/n0150_evaluate_reverse_polish_notation.rs rename to src/solution/s0150_evaluate_reverse_polish_notation.rs diff --git a/src/n0151_reverse_words_in_a_string.rs b/src/solution/s0151_reverse_words_in_a_string.rs similarity index 100% rename from src/n0151_reverse_words_in_a_string.rs rename to src/solution/s0151_reverse_words_in_a_string.rs diff --git a/src/n0152_maximum_product_subarray.rs b/src/solution/s0152_maximum_product_subarray.rs similarity index 100% rename from src/n0152_maximum_product_subarray.rs rename to src/solution/s0152_maximum_product_subarray.rs diff --git a/src/n0153_find_minimum_in_rotated_sorted_array.rs b/src/solution/s0153_find_minimum_in_rotated_sorted_array.rs similarity index 100% rename from src/n0153_find_minimum_in_rotated_sorted_array.rs rename to src/solution/s0153_find_minimum_in_rotated_sorted_array.rs diff --git a/src/n0154_find_minimum_in_rotated_sorted_array_ii.rs b/src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs similarity index 100% rename from src/n0154_find_minimum_in_rotated_sorted_array_ii.rs rename to src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs diff --git a/src/n0155_min_stack.rs b/src/solution/s0155_min_stack.rs similarity index 100% rename from src/n0155_min_stack.rs rename to src/solution/s0155_min_stack.rs diff --git a/src/n0162_find_peak_element.rs b/src/solution/s0162_find_peak_element.rs similarity index 100% rename from src/n0162_find_peak_element.rs rename to src/solution/s0162_find_peak_element.rs diff --git a/src/n0164_maximum_gap.rs b/src/solution/s0164_maximum_gap.rs similarity index 100% rename from src/n0164_maximum_gap.rs rename to src/solution/s0164_maximum_gap.rs diff --git a/src/n0165_compare_version_numbers.rs b/src/solution/s0165_compare_version_numbers.rs similarity index 100% rename from src/n0165_compare_version_numbers.rs rename to src/solution/s0165_compare_version_numbers.rs diff --git a/src/n0166_fraction_to_recurring_decimal.rs b/src/solution/s0166_fraction_to_recurring_decimal.rs similarity index 100% rename from src/n0166_fraction_to_recurring_decimal.rs rename to src/solution/s0166_fraction_to_recurring_decimal.rs diff --git a/src/n0167_two_sum_ii_input_array_is_sorted.rs b/src/solution/s0167_two_sum_ii_input_array_is_sorted.rs similarity index 100% rename from src/n0167_two_sum_ii_input_array_is_sorted.rs rename to src/solution/s0167_two_sum_ii_input_array_is_sorted.rs diff --git a/src/n0168_excel_sheet_column_title.rs b/src/solution/s0168_excel_sheet_column_title.rs similarity index 100% rename from src/n0168_excel_sheet_column_title.rs rename to src/solution/s0168_excel_sheet_column_title.rs diff --git a/src/n0169_majority_element.rs b/src/solution/s0169_majority_element.rs similarity index 100% rename from src/n0169_majority_element.rs rename to src/solution/s0169_majority_element.rs diff --git a/src/n0171_excel_sheet_column_number.rs b/src/solution/s0171_excel_sheet_column_number.rs similarity index 100% rename from src/n0171_excel_sheet_column_number.rs rename to src/solution/s0171_excel_sheet_column_number.rs diff --git a/src/n0172_factorial_trailing_zeroes.rs b/src/solution/s0172_factorial_trailing_zeroes.rs similarity index 100% rename from src/n0172_factorial_trailing_zeroes.rs rename to src/solution/s0172_factorial_trailing_zeroes.rs diff --git a/src/n0173_binary_search_tree_iterator.rs b/src/solution/s0173_binary_search_tree_iterator.rs similarity index 94% rename from src/n0173_binary_search_tree_iterator.rs rename to src/solution/s0173_binary_search_tree_iterator.rs index 582e922a..caef4724 100644 --- a/src/n0173_binary_search_tree_iterator.rs +++ b/src/solution/s0173_binary_search_tree_iterator.rs @@ -5,7 +5,7 @@ * * Calling next() will return the next smallest number in the BST. * - * + * * * * @@ -27,7 +27,7 @@ * iterator.hasNext(); // return false * * - * + * * * Note: * @@ -38,7 +38,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; use std::cell::RefCell; use std::rc::Rc; diff --git a/src/n0174_dungeon_game.rs b/src/solution/s0174_dungeon_game.rs similarity index 100% rename from src/n0174_dungeon_game.rs rename to src/solution/s0174_dungeon_game.rs diff --git a/src/n0179_largest_number.rs b/src/solution/s0179_largest_number.rs similarity index 100% rename from src/n0179_largest_number.rs rename to src/solution/s0179_largest_number.rs diff --git a/src/n0187_repeated_dna_sequences.rs b/src/solution/s0187_repeated_dna_sequences.rs similarity index 100% rename from src/n0187_repeated_dna_sequences.rs rename to src/solution/s0187_repeated_dna_sequences.rs diff --git a/src/n0188_best_time_to_buy_and_sell_stock_iv.rs b/src/solution/s0188_best_time_to_buy_and_sell_stock_iv.rs similarity index 100% rename from src/n0188_best_time_to_buy_and_sell_stock_iv.rs rename to src/solution/s0188_best_time_to_buy_and_sell_stock_iv.rs diff --git a/src/n0189_rotate_array.rs b/src/solution/s0189_rotate_array.rs similarity index 100% rename from src/n0189_rotate_array.rs rename to src/solution/s0189_rotate_array.rs diff --git a/src/n0198_house_robber.rs b/src/solution/s0198_house_robber.rs similarity index 100% rename from src/n0198_house_robber.rs rename to src/solution/s0198_house_robber.rs diff --git a/src/n0199_binary_tree_right_side_view.rs b/src/solution/s0199_binary_tree_right_side_view.rs similarity index 97% rename from src/n0199_binary_tree_right_side_view.rs rename to src/solution/s0199_binary_tree_right_side_view.rs index 403a3404..c580970c 100644 --- a/src/n0199_binary_tree_right_side_view.rs +++ b/src/solution/s0199_binary_tree_right_side_view.rs @@ -18,7 +18,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0200_number_of_islands.rs b/src/solution/s0200_number_of_islands.rs similarity index 100% rename from src/n0200_number_of_islands.rs rename to src/solution/s0200_number_of_islands.rs diff --git a/src/n0201_bitwise_and_of_numbers_range.rs b/src/solution/s0201_bitwise_and_of_numbers_range.rs similarity index 100% rename from src/n0201_bitwise_and_of_numbers_range.rs rename to src/solution/s0201_bitwise_and_of_numbers_range.rs diff --git a/src/n0202_happy_number.rs b/src/solution/s0202_happy_number.rs similarity index 100% rename from src/n0202_happy_number.rs rename to src/solution/s0202_happy_number.rs diff --git a/src/n0203_remove_linked_list_elements.rs b/src/solution/s0203_remove_linked_list_elements.rs similarity index 95% rename from src/n0203_remove_linked_list_elements.rs rename to src/solution/s0203_remove_linked_list_elements.rs index 290923d6..f8d9bc43 100644 --- a/src/n0203_remove_linked_list_elements.rs +++ b/src/solution/s0203_remove_linked_list_elements.rs @@ -12,7 +12,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0204_count_primes.rs b/src/solution/s0204_count_primes.rs similarity index 100% rename from src/n0204_count_primes.rs rename to src/solution/s0204_count_primes.rs diff --git a/src/n0205_isomorphic_strings.rs b/src/solution/s0205_isomorphic_strings.rs similarity index 100% rename from src/n0205_isomorphic_strings.rs rename to src/solution/s0205_isomorphic_strings.rs diff --git a/src/n0206_reverse_linked_list.rs b/src/solution/s0206_reverse_linked_list.rs similarity index 94% rename from src/n0206_reverse_linked_list.rs rename to src/solution/s0206_reverse_linked_list.rs index bdbe34e4..4689f415 100644 --- a/src/n0206_reverse_linked_list.rs +++ b/src/solution/s0206_reverse_linked_list.rs @@ -16,7 +16,7 @@ * */ pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; +use crate::util::linked_list::{to_list, ListNode}; // submission codes start here diff --git a/src/n0207_course_schedule.rs b/src/solution/s0207_course_schedule.rs similarity index 100% rename from src/n0207_course_schedule.rs rename to src/solution/s0207_course_schedule.rs diff --git a/src/n0208_implement_trie_prefix_tree.rs b/src/solution/s0208_implement_trie_prefix_tree.rs similarity index 100% rename from src/n0208_implement_trie_prefix_tree.rs rename to src/solution/s0208_implement_trie_prefix_tree.rs diff --git a/src/n0209_minimum_size_subarray_sum.rs b/src/solution/s0209_minimum_size_subarray_sum.rs similarity index 100% rename from src/n0209_minimum_size_subarray_sum.rs rename to src/solution/s0209_minimum_size_subarray_sum.rs diff --git a/src/n0210_course_schedule_ii.rs b/src/solution/s0210_course_schedule_ii.rs similarity index 100% rename from src/n0210_course_schedule_ii.rs rename to src/solution/s0210_course_schedule_ii.rs diff --git a/src/n0211_add_and_search_word_data_structure_design.rs b/src/solution/s0211_add_and_search_word_data_structure_design.rs similarity index 100% rename from src/n0211_add_and_search_word_data_structure_design.rs rename to src/solution/s0211_add_and_search_word_data_structure_design.rs diff --git a/src/n0212_word_search_ii.rs b/src/solution/s0212_word_search_ii.rs similarity index 100% rename from src/n0212_word_search_ii.rs rename to src/solution/s0212_word_search_ii.rs diff --git a/src/n0213_house_robber_ii.rs b/src/solution/s0213_house_robber_ii.rs similarity index 100% rename from src/n0213_house_robber_ii.rs rename to src/solution/s0213_house_robber_ii.rs diff --git a/src/n0214_shortest_palindrome.rs b/src/solution/s0214_shortest_palindrome.rs similarity index 100% rename from src/n0214_shortest_palindrome.rs rename to src/solution/s0214_shortest_palindrome.rs diff --git a/src/n0215_kth_largest_element_in_an_array.rs b/src/solution/s0215_kth_largest_element_in_an_array.rs similarity index 100% rename from src/n0215_kth_largest_element_in_an_array.rs rename to src/solution/s0215_kth_largest_element_in_an_array.rs diff --git a/src/n0216_combination_sum_iii.rs b/src/solution/s0216_combination_sum_iii.rs similarity index 100% rename from src/n0216_combination_sum_iii.rs rename to src/solution/s0216_combination_sum_iii.rs diff --git a/src/n0217_contains_duplicate.rs b/src/solution/s0217_contains_duplicate.rs similarity index 100% rename from src/n0217_contains_duplicate.rs rename to src/solution/s0217_contains_duplicate.rs diff --git a/src/n0218_the_skyline_problem.rs b/src/solution/s0218_the_skyline_problem.rs similarity index 100% rename from src/n0218_the_skyline_problem.rs rename to src/solution/s0218_the_skyline_problem.rs diff --git a/src/n0219_contains_duplicate_ii.rs b/src/solution/s0219_contains_duplicate_ii.rs similarity index 100% rename from src/n0219_contains_duplicate_ii.rs rename to src/solution/s0219_contains_duplicate_ii.rs diff --git a/src/n0220_contains_duplicate_iii.rs b/src/solution/s0220_contains_duplicate_iii.rs similarity index 100% rename from src/n0220_contains_duplicate_iii.rs rename to src/solution/s0220_contains_duplicate_iii.rs diff --git a/src/n0221_maximal_square.rs b/src/solution/s0221_maximal_square.rs similarity index 100% rename from src/n0221_maximal_square.rs rename to src/solution/s0221_maximal_square.rs diff --git a/src/n0222_count_complete_tree_nodes.rs b/src/solution/s0222_count_complete_tree_nodes.rs similarity index 98% rename from src/n0222_count_complete_tree_nodes.rs rename to src/solution/s0222_count_complete_tree_nodes.rs index c511399d..189fb3dd 100644 --- a/src/n0222_count_complete_tree_nodes.rs +++ b/src/solution/s0222_count_complete_tree_nodes.rs @@ -22,7 +22,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0223_rectangle_area.rs b/src/solution/s0223_rectangle_area.rs similarity index 100% rename from src/n0223_rectangle_area.rs rename to src/solution/s0223_rectangle_area.rs diff --git a/src/n0224_basic_calculator.rs b/src/solution/s0224_basic_calculator.rs similarity index 100% rename from src/n0224_basic_calculator.rs rename to src/solution/s0224_basic_calculator.rs diff --git a/src/n0225_implement_stack_using_queues.rs b/src/solution/s0225_implement_stack_using_queues.rs similarity index 100% rename from src/n0225_implement_stack_using_queues.rs rename to src/solution/s0225_implement_stack_using_queues.rs diff --git a/src/n0226_invert_binary_tree.rs b/src/solution/s0226_invert_binary_tree.rs similarity index 97% rename from src/n0226_invert_binary_tree.rs rename to src/solution/s0226_invert_binary_tree.rs index 29e2a953..30bd001a 100644 --- a/src/n0226_invert_binary_tree.rs +++ b/src/solution/s0226_invert_binary_tree.rs @@ -30,7 +30,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0227_basic_calculator_ii.rs b/src/solution/s0227_basic_calculator_ii.rs similarity index 100% rename from src/n0227_basic_calculator_ii.rs rename to src/solution/s0227_basic_calculator_ii.rs diff --git a/src/n0228_summary_ranges.rs b/src/solution/s0228_summary_ranges.rs similarity index 100% rename from src/n0228_summary_ranges.rs rename to src/solution/s0228_summary_ranges.rs diff --git a/src/n0229_majority_element_ii.rs b/src/solution/s0229_majority_element_ii.rs similarity index 100% rename from src/n0229_majority_element_ii.rs rename to src/solution/s0229_majority_element_ii.rs diff --git a/src/n0230_kth_smallest_element_in_a_bst.rs b/src/solution/s0230_kth_smallest_element_in_a_bst.rs similarity index 97% rename from src/n0230_kth_smallest_element_in_a_bst.rs rename to src/solution/s0230_kth_smallest_element_in_a_bst.rs index 65de4484..fe14721f 100644 --- a/src/n0230_kth_smallest_element_in_a_bst.rs +++ b/src/solution/s0230_kth_smallest_element_in_a_bst.rs @@ -36,7 +36,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0231_power_of_two.rs b/src/solution/s0231_power_of_two.rs similarity index 100% rename from src/n0231_power_of_two.rs rename to src/solution/s0231_power_of_two.rs diff --git a/src/n0232_implement_queue_using_stacks.rs b/src/solution/s0232_implement_queue_using_stacks.rs similarity index 100% rename from src/n0232_implement_queue_using_stacks.rs rename to src/solution/s0232_implement_queue_using_stacks.rs diff --git a/src/n0233_number_of_digit_one.rs b/src/solution/s0233_number_of_digit_one.rs similarity index 100% rename from src/n0233_number_of_digit_one.rs rename to src/solution/s0233_number_of_digit_one.rs diff --git a/src/n0238_product_of_array_except_self.rs b/src/solution/s0238_product_of_array_except_self.rs similarity index 100% rename from src/n0238_product_of_array_except_self.rs rename to src/solution/s0238_product_of_array_except_self.rs diff --git a/src/n0239_sliding_window_maximum.rs b/src/solution/s0239_sliding_window_maximum.rs similarity index 100% rename from src/n0239_sliding_window_maximum.rs rename to src/solution/s0239_sliding_window_maximum.rs diff --git a/src/n0241_different_ways_to_add_parentheses.rs b/src/solution/s0241_different_ways_to_add_parentheses.rs similarity index 100% rename from src/n0241_different_ways_to_add_parentheses.rs rename to src/solution/s0241_different_ways_to_add_parentheses.rs diff --git a/src/n0242_valid_anagram.rs b/src/solution/s0242_valid_anagram.rs similarity index 100% rename from src/n0242_valid_anagram.rs rename to src/solution/s0242_valid_anagram.rs diff --git a/src/n0257_binary_tree_paths.rs b/src/solution/s0257_binary_tree_paths.rs similarity index 97% rename from src/n0257_binary_tree_paths.rs rename to src/solution/s0257_binary_tree_paths.rs index ef5254c9..c5d6d336 100644 --- a/src/n0257_binary_tree_paths.rs +++ b/src/solution/s0257_binary_tree_paths.rs @@ -22,7 +22,7 @@ * */ pub struct Solution {} -use super::util::tree::{to_tree, TreeNode}; +use crate::util::tree::{to_tree, TreeNode}; // submission codes start here diff --git a/src/n0258_add_digits.rs b/src/solution/s0258_add_digits.rs similarity index 100% rename from src/n0258_add_digits.rs rename to src/solution/s0258_add_digits.rs diff --git a/src/n0260_single_number_iii.rs b/src/solution/s0260_single_number_iii.rs similarity index 100% rename from src/n0260_single_number_iii.rs rename to src/solution/s0260_single_number_iii.rs diff --git a/src/n0263_ugly_number.rs b/src/solution/s0263_ugly_number.rs similarity index 100% rename from src/n0263_ugly_number.rs rename to src/solution/s0263_ugly_number.rs diff --git a/src/n0264_ugly_number_ii.rs b/src/solution/s0264_ugly_number_ii.rs similarity index 100% rename from src/n0264_ugly_number_ii.rs rename to src/solution/s0264_ugly_number_ii.rs diff --git a/src/n0268_missing_number.rs b/src/solution/s0268_missing_number.rs similarity index 100% rename from src/n0268_missing_number.rs rename to src/solution/s0268_missing_number.rs diff --git a/src/n0273_integer_to_english_words.rs b/src/solution/s0273_integer_to_english_words.rs similarity index 100% rename from src/n0273_integer_to_english_words.rs rename to src/solution/s0273_integer_to_english_words.rs diff --git a/src/n0274_h_index.rs b/src/solution/s0274_h_index.rs similarity index 100% rename from src/n0274_h_index.rs rename to src/solution/s0274_h_index.rs diff --git a/src/n0275_h_index_ii.rs b/src/solution/s0275_h_index_ii.rs similarity index 100% rename from src/n0275_h_index_ii.rs rename to src/solution/s0275_h_index_ii.rs diff --git a/src/n0279_perfect_squares.rs b/src/solution/s0279_perfect_squares.rs similarity index 100% rename from src/n0279_perfect_squares.rs rename to src/solution/s0279_perfect_squares.rs diff --git a/src/n0282_expression_add_operators.rs b/src/solution/s0282_expression_add_operators.rs similarity index 100% rename from src/n0282_expression_add_operators.rs rename to src/solution/s0282_expression_add_operators.rs diff --git a/src/n0283_move_zeroes.rs b/src/solution/s0283_move_zeroes.rs similarity index 100% rename from src/n0283_move_zeroes.rs rename to src/solution/s0283_move_zeroes.rs diff --git a/src/n0287_find_the_duplicate_number.rs b/src/solution/s0287_find_the_duplicate_number.rs similarity index 100% rename from src/n0287_find_the_duplicate_number.rs rename to src/solution/s0287_find_the_duplicate_number.rs diff --git a/src/n0289_game_of_life.rs b/src/solution/s0289_game_of_life.rs similarity index 100% rename from src/n0289_game_of_life.rs rename to src/solution/s0289_game_of_life.rs diff --git a/src/n0290_word_pattern.rs b/src/solution/s0290_word_pattern.rs similarity index 100% rename from src/n0290_word_pattern.rs rename to src/solution/s0290_word_pattern.rs diff --git a/src/n0292_nim_game.rs b/src/solution/s0292_nim_game.rs similarity index 100% rename from src/n0292_nim_game.rs rename to src/solution/s0292_nim_game.rs diff --git a/src/n0295_find_median_from_data_stream.rs b/src/solution/s0295_find_median_from_data_stream.rs similarity index 100% rename from src/n0295_find_median_from_data_stream.rs rename to src/solution/s0295_find_median_from_data_stream.rs diff --git a/src/n0299_bulls_and_cows.rs b/src/solution/s0299_bulls_and_cows.rs similarity index 100% rename from src/n0299_bulls_and_cows.rs rename to src/solution/s0299_bulls_and_cows.rs diff --git a/src/n0300_longest_increasing_subsequence.rs b/src/solution/s0300_longest_increasing_subsequence.rs similarity index 100% rename from src/n0300_longest_increasing_subsequence.rs rename to src/solution/s0300_longest_increasing_subsequence.rs diff --git a/src/n0301_remove_invalid_parentheses.rs b/src/solution/s0301_remove_invalid_parentheses.rs similarity index 100% rename from src/n0301_remove_invalid_parentheses.rs rename to src/solution/s0301_remove_invalid_parentheses.rs diff --git a/src/n0303_range_sum_query_immutable.rs b/src/solution/s0303_range_sum_query_immutable.rs similarity index 100% rename from src/n0303_range_sum_query_immutable.rs rename to src/solution/s0303_range_sum_query_immutable.rs diff --git a/src/n0304_range_sum_query_2d_immutable.rs b/src/solution/s0304_range_sum_query_2d_immutable.rs similarity index 100% rename from src/n0304_range_sum_query_2d_immutable.rs rename to src/solution/s0304_range_sum_query_2d_immutable.rs diff --git a/src/n0306_additive_number.rs b/src/solution/s0306_additive_number.rs similarity index 100% rename from src/n0306_additive_number.rs rename to src/solution/s0306_additive_number.rs diff --git a/src/n0307_range_sum_query_mutable.rs b/src/solution/s0307_range_sum_query_mutable.rs similarity index 100% rename from src/n0307_range_sum_query_mutable.rs rename to src/solution/s0307_range_sum_query_mutable.rs diff --git a/src/n0309_best_time_to_buy_and_sell_stock_with_cooldown.rs b/src/solution/s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs similarity index 100% rename from src/n0309_best_time_to_buy_and_sell_stock_with_cooldown.rs rename to src/solution/s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs diff --git a/src/n0310_minimum_height_trees.rs b/src/solution/s0310_minimum_height_trees.rs similarity index 100% rename from src/n0310_minimum_height_trees.rs rename to src/solution/s0310_minimum_height_trees.rs diff --git a/src/n0312_burst_balloons.rs b/src/solution/s0312_burst_balloons.rs similarity index 100% rename from src/n0312_burst_balloons.rs rename to src/solution/s0312_burst_balloons.rs diff --git a/src/n0313_super_ugly_number.rs b/src/solution/s0313_super_ugly_number.rs similarity index 100% rename from src/n0313_super_ugly_number.rs rename to src/solution/s0313_super_ugly_number.rs diff --git a/src/n0509_fibonacci_number.rs b/src/solution/s0509_fibonacci_number.rs similarity index 100% rename from src/n0509_fibonacci_number.rs rename to src/solution/s0509_fibonacci_number.rs diff --git a/src/n0704_binary_search.rs b/src/solution/s0704_binary_search.rs similarity index 100% rename from src/n0704_binary_search.rs rename to src/solution/s0704_binary_search.rs diff --git a/src/n0969_pancake_sorting.rs b/src/solution/s0969_pancake_sorting.rs similarity index 100% rename from src/n0969_pancake_sorting.rs rename to src/solution/s0969_pancake_sorting.rs diff --git a/src/n1018_binary_prefix_divisible_by_5.rs b/src/solution/s1018_binary_prefix_divisible_by_5.rs similarity index 100% rename from src/n1018_binary_prefix_divisible_by_5.rs rename to src/solution/s1018_binary_prefix_divisible_by_5.rs diff --git a/src/n1046_last_stone_weight.rs b/src/solution/s1046_last_stone_weight.rs similarity index 100% rename from src/n1046_last_stone_weight.rs rename to src/solution/s1046_last_stone_weight.rs From cbfeffbcd533a8a56e9d91a8a3ce45c112fc0da5 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 13:51:19 +0800 Subject: [PATCH 04/47] =?UTF-8?q?Problem=E5=A2=9E=E5=8A=A0return=20type?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/problem.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/problem.rs b/src/problem.rs index d4f7310f..47101b6d 100644 --- a/src/problem.rs +++ b/src/problem.rs @@ -43,6 +43,7 @@ pub fn get_problem(frontend_question_id: u32) -> Option { sample_test_case: resp.data.question.sample_test_case, difficulty: problem.difficulty.to_string(), question_id: problem.stat.frontend_question_id, + return_type: serde_json::from_str(&resp.data.question.meta_data.return_info.type_name).unwrap(), }); } } @@ -64,6 +65,7 @@ pub struct Problem { pub sample_test_case: String, pub difficulty: String, pub question_id: u32, + pub return_type: String, } #[derive(Serialize, Deserialize)] @@ -111,7 +113,21 @@ struct Question { #[serde(rename = "sampleTestCase")] sample_test_case: String, #[serde(rename = "metaData")] - meta_data: String, + meta_data: MetaData, +} + +#[derive(Debug, Serialize, Deserialize)] +struct MetaData { + name:String, + params: String, + return_info: ReturnInfo, +} + +#[derive(Debug, Serialize, Deserialize)] +struct ReturnInfo { + #[serde(rename = "type")] + type_name: String, + params: String, } #[derive(Debug, Serialize, Deserialize)] From 70467d4f02dd007725a968c64aee2315afccc862 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 14:24:57 +0800 Subject: [PATCH 05/47] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=BAListNode=E7=9A=84=E9=97=AE=E9=A2=98,?= =?UTF-8?q?=20=E6=8F=92=E5=85=A5=E9=BB=98=E8=AE=A4=E7=AD=94=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 19 ++++++++++--------- Cargo.toml | 1 + src/main.rs | 13 ++++++++++++- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d542a78d..69f4ab42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -448,6 +448,7 @@ name = "leetcode-rust" version = "0.1.0" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", @@ -681,7 +682,7 @@ dependencies = [ "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -849,18 +850,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.3.1" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1071,7 +1072,7 @@ dependencies = [ [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1454,8 +1455,8 @@ dependencies = [ "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" -"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" +"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" +"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)" = "02b7e953e14c6f3102b7e8d1f1ee3abf5ecee80b427f5565c9389835cecae95c" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" @@ -1478,7 +1479,7 @@ dependencies = [ "checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" diff --git a/Cargo.toml b/Cargo.toml index c414242f..f6b7c1c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ serde = "1.0" serde_json = "1.0" serde_derive = "1.0" rand = "0.6.5" +regex = "1.3.4" [lib] doctest = false diff --git a/src/main.rs b/src/main.rs index 967c5f85..46cc015c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,7 @@ use std::fs; use std::io; use std::io::Write; use std::path::Path; +use regex::Regex; /// main() helps to generate the submission template .rs fn main() { @@ -74,7 +75,7 @@ fn main() { let source = template .replace("__PROBLEM_TITLE__", &problem.title) .replace("__PROBLEM_DESC__", &build_desc(&problem.content)) - .replace("__PROBLEM_DEFAULT_CODE__", &code.default_code) + .replace("__PROBLEM_DEFAULT_CODE__", &insert_return_in_code(&problem.return_type, &code.default_code)) .replace("__PROBLEM_ID__", &format!("{}", problem.question_id)) .replace("__EXTRA_USE__", &parse_extra_use(&code.default_code)); @@ -147,6 +148,16 @@ fn parse_extra_use(code: &str) -> String { extra_use_line } +fn insert_return_in_code(return_type: &str, code: &str) -> String { + match return_type { + "ListNode" => { + let re = Regex::new(r"\{\n +\n +}").unwrap(); + re.replace(code, format!("{{\n{:8}Some(Box::new(ListNode::new(0)))\n{:4}}}")).to_string() + }, + _ => code + } +} + fn build_desc(content: &str) -> String { // TODO: fix this shit content From 23a0241186392082ef835ccc85779c7db5a5e3e6 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 15:47:01 +0800 Subject: [PATCH 06/47] fix --- src/lib.rs | 2 +- src/main.rs | 8 +++--- src/n0206_reverse_linked_list.rs | 49 -------------------------------- src/problem.rs | 22 ++++---------- 4 files changed, 11 insertions(+), 70 deletions(-) delete mode 100644 src/n0206_reverse_linked_list.rs diff --git a/src/lib.rs b/src/lib.rs index 815c1ce0..0d8a7e64 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -231,10 +231,10 @@ mod n0199_binary_tree_right_side_view; mod n0282_expression_add_operators; mod n0021_merge_two_sorted_lists; mod n0129_sum_root_to_leaf_numbers; -mod n0206_reverse_linked_list; mod n0131_palindrome_partitioning; mod n0307_range_sum_query_mutable; mod n0111_minimum_depth_of_binary_tree; mod n0092_reverse_linked_list_ii; mod n0303_range_sum_query_immutable; mod n0102_binary_tree_level_order_traversal; +mod n0206_reverse_linked_list; diff --git a/src/main.rs b/src/main.rs index 46cc015c..1ac97b3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -150,11 +150,11 @@ fn parse_extra_use(code: &str) -> String { fn insert_return_in_code(return_type: &str, code: &str) -> String { match return_type { - "ListNode" => { - let re = Regex::new(r"\{\n +\n +}").unwrap(); - re.replace(code, format!("{{\n{:8}Some(Box::new(ListNode::new(0)))\n{:4}}}")).to_string() + "ListNode" => { + let re = Regex::new(r"\{[ \n]+}").unwrap(); + re.replace(&code, "{\n Some(Box::new(ListNode::new(0)))\n }").to_string() }, - _ => code + _ => code.to_string() } } diff --git a/src/n0206_reverse_linked_list.rs b/src/n0206_reverse_linked_list.rs deleted file mode 100644 index bdbe34e4..00000000 --- a/src/n0206_reverse_linked_list.rs +++ /dev/null @@ -1,49 +0,0 @@ -/** - * [206] Reverse Linked List - * - * Reverse a singly linked list. - * - * Example: - * - * - * Input: 1->2->3->4->5->NULL - * Output: 5->4->3->2->1->NULL - * - * - * Follow up: - * - * A linked list can be reversed either iteratively or recursively. Could you implement both? - * - */ -pub struct Solution {} -use super::util::linked_list::{to_list, ListNode}; - -// submission codes start here - -impl Solution { - pub fn reverse_list(head: Option>) -> Option> { - let mut curr = head; - let mut next = None; - while let Some(mut inner) = curr { - curr = inner.next.take(); - inner.next = next; - next = Some(inner); - } - next - } -} - -// submission codes end - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_206() { - assert_eq!( - Solution::reverse_list(linked![1, 2, 3, 4, 5]), - linked![5, 4, 3, 2, 1] - ); - } -} diff --git a/src/problem.rs b/src/problem.rs index 47101b6d..16209f96 100644 --- a/src/problem.rs +++ b/src/problem.rs @@ -2,6 +2,7 @@ extern crate reqwest; extern crate serde_json; use std::fmt::{Display, Error, Formatter}; +use serde_json::Value; const PROBLEMS_URL: &str = "https://leetcode.com/api/problems/algorithms/"; const GRAPHQL_URL: &str = "https://leetcode.com/graphql"; @@ -43,7 +44,10 @@ pub fn get_problem(frontend_question_id: u32) -> Option { sample_test_case: resp.data.question.sample_test_case, difficulty: problem.difficulty.to_string(), question_id: problem.stat.frontend_question_id, - return_type: serde_json::from_str(&resp.data.question.meta_data.return_info.type_name).unwrap(), + return_type: { + let v: Value = serde_json::from_str(&resp.data.question.meta_data).unwrap(); + v["return"]["type"].to_string().as_str().replace("\"", "").to_string() + }, }); } } @@ -113,21 +117,7 @@ struct Question { #[serde(rename = "sampleTestCase")] sample_test_case: String, #[serde(rename = "metaData")] - meta_data: MetaData, -} - -#[derive(Debug, Serialize, Deserialize)] -struct MetaData { - name:String, - params: String, - return_info: ReturnInfo, -} - -#[derive(Debug, Serialize, Deserialize)] -struct ReturnInfo { - #[serde(rename = "type")] - type_name: String, - params: String, + meta_data: String, } #[derive(Debug, Serialize, Deserialize)] From b8b0d94f9ac860d41903b804de70733e1ec9bf32 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 15:48:42 +0800 Subject: [PATCH 07/47] fix --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0d8a7e64..03f472c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -237,4 +237,3 @@ mod n0111_minimum_depth_of_binary_tree; mod n0092_reverse_linked_list_ii; mod n0303_range_sum_query_immutable; mod n0102_binary_tree_level_order_traversal; -mod n0206_reverse_linked_list; From a1971ec56bda0d6bad6fd1e6c9b0fb4c22359320 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 15:50:27 +0800 Subject: [PATCH 08/47] revert --- src/lib.rs | 1 + src/n0206_reverse_linked_list.rs | 50 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/n0206_reverse_linked_list.rs diff --git a/src/lib.rs b/src/lib.rs index 03f472c5..815c1ce0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -231,6 +231,7 @@ mod n0199_binary_tree_right_side_view; mod n0282_expression_add_operators; mod n0021_merge_two_sorted_lists; mod n0129_sum_root_to_leaf_numbers; +mod n0206_reverse_linked_list; mod n0131_palindrome_partitioning; mod n0307_range_sum_query_mutable; mod n0111_minimum_depth_of_binary_tree; diff --git a/src/n0206_reverse_linked_list.rs b/src/n0206_reverse_linked_list.rs new file mode 100644 index 00000000..90159afa --- /dev/null +++ b/src/n0206_reverse_linked_list.rs @@ -0,0 +1,50 @@ +/** + * [206] Reverse Linked List + * + * Reverse a singly linked list. + * + * Example: + * + * + * Input: 1->2->3->4->5->NULL + * Output: 5->4->3->2->1->NULL + * + * + * Follow up: + * + * A linked list can be reversed either iteratively or recursively. Could you implement both? + * + */ +pub struct Solution {} + +use super::util::linked_list::{to_list, ListNode}; + +// submission codes start here + +impl Solution { + pub fn reverse_list(head: Option>) -> Option> { + let mut curr = head; + let mut next = None; + while let Some(mut inner) = curr { + curr = inner.next.take(); + inner.next = next; + next = Some(inner); + } + next + } +} + +// submission codes end + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_206() { + assert_eq!( + Solution::reverse_list(linked![1, 2, 3, 4, 5]), + linked![5, 4, 3, 2, 1] + ); + } +} From e150ee18cbfe562dc7195ebe082b06d69ab9f3f2 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 18:08:17 +0800 Subject: [PATCH 09/47] add default return value --- src/main.rs | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1ac97b3b..12bbdb62 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,12 +5,12 @@ extern crate serde_json; mod problem; +use regex::Regex; use std::env; use std::fs; use std::io; use std::io::Write; use std::path::Path; -use regex::Regex; /// main() helps to generate the submission template .rs fn main() { @@ -75,7 +75,10 @@ fn main() { let source = template .replace("__PROBLEM_TITLE__", &problem.title) .replace("__PROBLEM_DESC__", &build_desc(&problem.content)) - .replace("__PROBLEM_DEFAULT_CODE__", &insert_return_in_code(&problem.return_type, &code.default_code)) + .replace( + "__PROBLEM_DEFAULT_CODE__", + &insert_return_in_code(&problem.return_type, &code.default_code), + ) .replace("__PROBLEM_ID__", &format!("{}", problem.question_id)) .replace("__EXTRA_USE__", &parse_extra_use(&code.default_code)); @@ -149,12 +152,44 @@ fn parse_extra_use(code: &str) -> String { } fn insert_return_in_code(return_type: &str, code: &str) -> String { + let re = Regex::new(r"\{[ \n]+}").unwrap(); match return_type { - "ListNode" => { - let re = Regex::new(r"\{[ \n]+}").unwrap(); - re.replace(&code, "{\n Some(Box::new(ListNode::new(0)))\n }").to_string() - }, - _ => code.to_string() + "ListNode" => re + .replace(&code, "{\n Some(Box::new(ListNode::new(0)))\n }") + .to_string(), + "ListNode[]" => re.replace(&code, "{\n vec![]\n }").to_string(), + "TreeNode" => re + .replace( + &code, + "{\n Some(Rc::new(RefCell::new(TreeNode::new(0))))\n }", + ) + .to_string(), + "boolean" => re.replace(&code, "{\n false\n }").to_string(), + "character" => re.replace(&code, "{\n '0'\n }").to_string(), + "character[][]" => re.replace(&code, "{\n vec![]\n }").to_string(), + "double" => re.replace(&code, "{\n 0f64\n }").to_string(), + "double[]" => re.replace(&code, "{\n vec![]\n }").to_string(), + "int[]" => re.replace(&code, "{\n vec![]\n }").to_string(), + "integer" => re.replace(&code, "{\n 0\n }").to_string(), + "integer[]" => re.replace(&code, "{\n vec![]\n }").to_string(), + "integer[][]" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list>" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list>" => re.replace(&code, "{\n vec![]\n }").to_string(), + "list" => re.replace(&code, "{\n vec![]\n }").to_string(), + "null" => code.to_string(), + "string" => re + .replace(&code, "{\n String::new()\n }") + .to_string(), + "string[]" => re.replace(&code, "{\n vec![]\n }").to_string(), + "void" => code.to_string(), + "NestedInteger" => code.to_string(), + "Node" => code.to_string(), + _ => code.to_string(), } } From d0d889afe69526ea108e3ffcb2e8d5cba02a1a96 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 18:16:33 +0800 Subject: [PATCH 10/47] remove --- src/n0206_reverse_linked_list.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/n0206_reverse_linked_list.rs b/src/n0206_reverse_linked_list.rs index 90159afa..bdbe34e4 100644 --- a/src/n0206_reverse_linked_list.rs +++ b/src/n0206_reverse_linked_list.rs @@ -16,7 +16,6 @@ * */ pub struct Solution {} - use super::util::linked_list::{to_list, ListNode}; // submission codes start here From 01ce862f8526b43ee73bd1c51df25bc4e4344947 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 18:33:22 +0800 Subject: [PATCH 11/47] fix --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e25be217..ccd0c491 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,7 +116,7 @@ fn generate_random_id(except_ids: &[u32]) -> u32 { } fn get_solved_ids() -> Vec { - let paths = fs::read_dir("./src").unwrap(); + let paths = fs::read_dir("./src/problem").unwrap(); let mut solved_ids = Vec::new(); for path in paths { From 360a3f47895a049679128b4c0b2c96e31e444f8c Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 18:35:23 +0800 Subject: [PATCH 12/47] fix --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ccd0c491..3533f9d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ fn main() { .unwrap_or_else(|_| panic!("not a number: {}", id_arg)); if solved_ids.contains(&id) { println!( - "The problem you chose is invalid (the problem may have been solved \ + "The problem you chose is invalid (the problem may have been downloaded \ or may have no rust version)." ); continue; From f90c44eef14a18986851d26af39ceccaad17718b Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 18:36:04 +0800 Subject: [PATCH 13/47] fix --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3533f9d5..3501fe34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ fn main() { .unwrap_or_else(|_| panic!("not a number: {}", id_arg)); if solved_ids.contains(&id) { println!( - "The problem you chose is invalid (the problem may have been downloaded \ + "The problem you chose is invalid (the problem may have been initialized \ or may have no rust version)." ); continue; From 9f05e1fb83c1ba3f6976f587ce617c225bf2eb5b Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 20:37:35 +0800 Subject: [PATCH 14/47] add option to solve problem --- Cargo.lock | 19 ++++++------ Cargo.toml | 1 + src/main.rs | 88 +++++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 80 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d542a78d..69f4ab42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -448,6 +448,7 @@ name = "leetcode-rust" version = "0.1.0" dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", @@ -681,7 +682,7 @@ dependencies = [ "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -849,18 +850,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "1.3.1" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1071,7 +1072,7 @@ dependencies = [ [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1454,8 +1455,8 @@ dependencies = [ "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" -"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" +"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" +"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)" = "02b7e953e14c6f3102b7e8d1f1ee3abf5ecee80b427f5565c9389835cecae95c" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" @@ -1478,7 +1479,7 @@ dependencies = [ "checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" diff --git a/Cargo.toml b/Cargo.toml index c414242f..f6b7c1c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ serde = "1.0" serde_json = "1.0" serde_derive = "1.0" rand = "0.6.5" +regex = "1.3.4" [lib] doctest = false diff --git a/src/main.rs b/src/main.rs index 3501fe34..9c3fd6d7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,10 +5,12 @@ extern crate serde_json; mod fetcher; +use regex::Regex; use std::env; use std::fs; +use std::fs::File; use std::io; -use std::io::Write; +use std::io::{BufRead, Write}; use std::path::Path; /// main() helps to generate the submission template .rs @@ -18,30 +20,44 @@ fn main() { loop { println!("Please enter a frontend problem id, or \"random\" to generate a random one."); let mut is_random = false; + let mut is_solving = false; let mut id: u32 = 0; let mut id_arg = String::new(); io::stdin() .read_line(&mut id_arg) .expect("Failed to read line"); let id_arg = id_arg.trim(); - match id_arg { - "random" => { - println!("You select random mode."); - id = generate_random_id(&solved_ids); - is_random = true; - println!("Generate random problem: {}", &id); - } - _ => { - id = id_arg - .parse::() - .unwrap_or_else(|_| panic!("not a number: {}", id_arg)); - if solved_ids.contains(&id) { - println!( - "The problem you chose is invalid (the problem may have been initialized \ - or may have no rust version)." - ); - continue; - } + + let random_pattern = Regex::new(r"^random$").unwrap(); + let solving_pattern = Regex::new(r"^solve (\d+)$").unwrap(); + + if random_pattern.is_match(id_arg) { + println!("You select random mode."); + id = generate_random_id(&solved_ids); + is_random = true; + println!("Generate random problem: {}", &id); + } else if solving_pattern.is_match(id_arg) { + // solve a problem + // move it from problem/ to solution/ + is_solving = true; + id = solving_pattern + .captures(id_arg) + .unwrap() + .get(1) + .unwrap() + .as_str() + .parse() + .unwrap(); + } else { + id = id_arg + .parse::() + .unwrap_or_else(|_| panic!("not a number: {}", id_arg)); + if solved_ids.contains(&id) { + println!( + "The problem you chose is invalid (the problem may have been initialized \ + or may have no rust version)." + ); + continue; } } @@ -66,6 +82,40 @@ fn main() { problem.title_slug.replace("-", "_") ); let file_path = Path::new("./src/problem").join(format!("{}.rs", file_name)); + if is_solving { + // check problem/ existence + if !file_path.exists() { + panic!("problem does not exist"); + } + // check solution/ no existence + let solution_name = format!( + "s{:04}_{}", + problem.question_id, + problem.title_slug.replace("-", "_") + ); + let solution_path = Path::new("./src/solution").join(format!("{}.rs", solution_name)); + if solution_path.exists() { + panic!("solution exists"); + } + // rename/move file + fs::rename(file_path, solution_path).unwrap(); + // remove from problem/mod.rs + let mod_file = "./src/problem/mod.rs"; + let target_line = format!("mod {};", file_name); + let lines: Vec = io::BufReader::new(File::open(mod_file).unwrap()) + .lines() + .map(|x| x.unwrap()) + .filter(|x| *x != target_line) + .collect(); + fs::write(mod_file, lines.join("\n")); + // insert into solution/mod.rs + let mut lib_file = fs::OpenOptions::new() + .append(true) + .open("./src/solution/mod.rs") + .unwrap(); + writeln!(lib_file, "mod {};", solution_name); + break; + } if file_path.exists() { panic!("problem already initialized"); } From 8a06a5938f7dbf69226ab8a0ee0308f0da43ff28 Mon Sep 17 00:00:00 2001 From: songyzh Date: Sun, 2 Feb 2020 21:16:15 +0800 Subject: [PATCH 15/47] fix --- src/problem.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/problem.rs b/src/problem.rs index 16209f96..a60fb39e 100644 --- a/src/problem.rs +++ b/src/problem.rs @@ -1,8 +1,8 @@ extern crate reqwest; extern crate serde_json; -use std::fmt::{Display, Error, Formatter}; use serde_json::Value; +use std::fmt::{Display, Error, Formatter}; const PROBLEMS_URL: &str = "https://leetcode.com/api/problems/algorithms/"; const GRAPHQL_URL: &str = "https://leetcode.com/graphql"; @@ -46,7 +46,7 @@ pub fn get_problem(frontend_question_id: u32) -> Option { question_id: problem.stat.frontend_question_id, return_type: { let v: Value = serde_json::from_str(&resp.data.question.meta_data).unwrap(); - v["return"]["type"].to_string().as_str().replace("\"", "").to_string() + v["return"]["type"].to_string().replace("\"", "") }, }); } From 0d72e628b6c6b11cc5edca9725e3d505fcc7c355 Mon Sep 17 00:00:00 2001 From: songyzh Date: Tue, 4 Feb 2020 10:57:03 +0800 Subject: [PATCH 16/47] add a message to explain the solve $i command --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9c3fd6d7..f58192c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,7 +18,7 @@ fn main() { println!("Welcome to leetcode-rust system."); let mut solved_ids = get_solved_ids(); loop { - println!("Please enter a frontend problem id, or \"random\" to generate a random one."); + println!("Please enter a frontend problem id, or \"random\" to generate a random one, or \"solve $i\" to move problem to solution/"); let mut is_random = false; let mut is_solving = false; let mut id: u32 = 0; From 125c64c39b035d4cab2687d9bc2977749c8b0a59 Mon Sep 17 00:00:00 2001 From: songyzh Date: Tue, 4 Feb 2020 11:06:16 +0800 Subject: [PATCH 17/47] clarify error message --- src/main.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index f58192c0..87c333fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,10 +53,7 @@ fn main() { .parse::() .unwrap_or_else(|_| panic!("not a number: {}", id_arg)); if solved_ids.contains(&id) { - println!( - "The problem you chose is invalid (the problem may have been initialized \ - or may have no rust version)." - ); + println!("The problem you chose has been initialized in problem/"); continue; } } From 76edb8c5fb172de61a1e308d279e9b877ad32c5f Mon Sep 17 00:00:00 2001 From: songyzh Date: Tue, 4 Feb 2020 11:24:08 +0800 Subject: [PATCH 18/47] refactor get_solved_ids() according to current logic --- src/main.rs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/main.rs b/src/main.rs index 87c333fc..545c2d22 100644 --- a/src/main.rs +++ b/src/main.rs @@ -163,20 +163,12 @@ fn generate_random_id(except_ids: &[u32]) -> u32 { } fn get_solved_ids() -> Vec { - let paths = fs::read_dir("./src/problem").unwrap(); - let mut solved_ids = Vec::new(); - - for path in paths { - let path = path.unwrap().path(); - let s = path.to_str().unwrap(); - if !s.starts_with('n') { - continue; - } - let id = &s[7..11]; - let id = id.parse::().unwrap(); - solved_ids.push(id); - } - solved_ids + let content = fs::read_to_string("./src/problem/mod.rs").unwrap(); + let id_pattern = Regex::new(r"p(\d{4})_").unwrap(); + id_pattern + .captures_iter(&content) + .map(|x| x.get(1).unwrap().as_str().parse().unwrap()) + .collect() } fn parse_extra_use(code: &str) -> String { From 695f53a684264b19f0d2e94541fdb18cc1f37628 Mon Sep 17 00:00:00 2001 From: songyzh Date: Tue, 4 Feb 2020 11:28:00 +0800 Subject: [PATCH 19/47] clarify var and fn name --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 545c2d22..cf5d251b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ use std::path::Path; /// main() helps to generate the submission template .rs fn main() { println!("Welcome to leetcode-rust system."); - let mut solved_ids = get_solved_ids(); + let mut initialized_ids = get_initialized_ids(); loop { println!("Please enter a frontend problem id, or \"random\" to generate a random one, or \"solve $i\" to move problem to solution/"); let mut is_random = false; @@ -33,7 +33,7 @@ fn main() { if random_pattern.is_match(id_arg) { println!("You select random mode."); - id = generate_random_id(&solved_ids); + id = generate_random_id(&initialized_ids); is_random = true; println!("Generate random problem: {}", &id); } else if solving_pattern.is_match(id_arg) { @@ -52,7 +52,7 @@ fn main() { id = id_arg .parse::() .unwrap_or_else(|_| panic!("not a number: {}", id_arg)); - if solved_ids.contains(&id) { + if initialized_ids.contains(&id) { println!("The problem you chose has been initialized in problem/"); continue; } @@ -68,7 +68,7 @@ fn main() { let code = problem.code_definition.iter().find(|&d| d.value == "rust"); if code.is_none() { println!("Problem {} has no rust version.", &id); - solved_ids.push(problem.question_id); + initialized_ids.push(problem.question_id); continue; } let code = code.unwrap(); @@ -162,7 +162,7 @@ fn generate_random_id(except_ids: &[u32]) -> u32 { } } -fn get_solved_ids() -> Vec { +fn get_initialized_ids() -> Vec { let content = fs::read_to_string("./src/problem/mod.rs").unwrap(); let id_pattern = Regex::new(r"p(\d{4})_").unwrap(); id_pattern From bc6fb496f8cd0caacf806c80b599b72ff4137a79 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 14:10:59 +0800 Subject: [PATCH 20/47] extract solving logic --- src/main.rs | 76 +++++++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 34 deletions(-) diff --git a/src/main.rs b/src/main.rs index 35bb8363..68776113 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,6 +48,7 @@ fn main() { .as_str() .parse() .unwrap(); + deal_solving(&id); } else { id = id_arg .parse::() @@ -79,40 +80,6 @@ fn main() { problem.title_slug.replace("-", "_") ); let file_path = Path::new("./src/problem").join(format!("{}.rs", file_name)); - if is_solving { - // check problem/ existence - if !file_path.exists() { - panic!("problem does not exist"); - } - // check solution/ no existence - let solution_name = format!( - "s{:04}_{}", - problem.question_id, - problem.title_slug.replace("-", "_") - ); - let solution_path = Path::new("./src/solution").join(format!("{}.rs", solution_name)); - if solution_path.exists() { - panic!("solution exists"); - } - // rename/move file - fs::rename(file_path, solution_path).unwrap(); - // remove from problem/mod.rs - let mod_file = "./src/problem/mod.rs"; - let target_line = format!("mod {};", file_name); - let lines: Vec = io::BufReader::new(File::open(mod_file).unwrap()) - .lines() - .map(|x| x.unwrap()) - .filter(|x| *x != target_line) - .collect(); - fs::write(mod_file, lines.join("\n")); - // insert into solution/mod.rs - let mut lib_file = fs::OpenOptions::new() - .append(true) - .open("./src/solution/mod.rs") - .unwrap(); - writeln!(lib_file, "mod {};", solution_name); - break; - } if file_path.exists() { panic!("problem already initialized"); } @@ -265,3 +232,44 @@ fn build_desc(content: &str) -> String { .replace("\n\n", "\n") .replace("\n", "\n * ") } + +fn deal_solving(id: &u32) { + let problem = fetcher::get_problem(*id).unwrap(); + let file_name = format!( + "p{:04}_{}", + problem.question_id, + problem.title_slug.replace("-", "_") + ); + let file_path = Path::new("./src/problem").join(format!("{}.rs", file_name)); + // check problem/ existence + if !file_path.exists() { + panic!("problem does not exist"); + } + // check solution/ no existence + let solution_name = format!( + "s{:04}_{}", + problem.question_id, + problem.title_slug.replace("-", "_") + ); + let solution_path = Path::new("./src/solution").join(format!("{}.rs", solution_name)); + if solution_path.exists() { + panic!("solution exists"); + } + // rename/move file + fs::rename(file_path, solution_path).unwrap(); + // remove from problem/mod.rs + let mod_file = "./src/problem/mod.rs"; + let target_line = format!("mod {};", file_name); + let lines: Vec = io::BufReader::new(File::open(mod_file).unwrap()) + .lines() + .map(|x| x.unwrap()) + .filter(|x| *x != target_line) + .collect(); + fs::write(mod_file, lines.join("\n")); + // insert into solution/mod.rs + let mut lib_file = fs::OpenOptions::new() + .append(true) + .open("./src/solution/mod.rs") + .unwrap(); + writeln!(lib_file, "mod {};", solution_name); +} From b3d28ecd485350fe584308ca1a1584663bf94ed3 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 14:16:02 +0800 Subject: [PATCH 21/47] fix --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 68776113..de4129e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,6 +49,7 @@ fn main() { .parse() .unwrap(); deal_solving(&id); + break; } else { id = id_arg .parse::() From 77a6accae94c94f37ec2d7b95bcc21e46d7b34c5 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 14:20:38 +0800 Subject: [PATCH 22/47] extract problem dealing logic --- src/main.rs | 80 ++++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/src/main.rs b/src/main.rs index de4129e7..677fb3d6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,7 @@ extern crate serde_json; mod fetcher; +use crate::fetcher::{CodeDefinition, Problem}; use regex::Regex; use std::env; use std::fs; @@ -74,44 +75,7 @@ fn main() { continue; } let code = code.unwrap(); - - let file_name = format!( - "p{:04}_{}", - problem.question_id, - problem.title_slug.replace("-", "_") - ); - let file_path = Path::new("./src/problem").join(format!("{}.rs", file_name)); - if file_path.exists() { - panic!("problem already initialized"); - } - - let template = fs::read_to_string("./template.rs").unwrap(); - let source = template - .replace("__PROBLEM_TITLE__", &problem.title) - .replace("__PROBLEM_DESC__", &build_desc(&problem.content)) - .replace( - "__PROBLEM_DEFAULT_CODE__", - &insert_return_in_code(&problem.return_type, &code.default_code), - ) - .replace("__PROBLEM_ID__", &format!("{}", problem.question_id)) - .replace("__EXTRA_USE__", &parse_extra_use(&code.default_code)); - - let mut file = fs::OpenOptions::new() - .write(true) - .create(true) - .truncate(true) - .open(&file_path) - .unwrap(); - - file.write_all(source.as_bytes()).unwrap(); - drop(file); - - let mut lib_file = fs::OpenOptions::new() - .write(true) - .append(true) - .open("./src/problem/mod.rs") - .unwrap(); - writeln!(lib_file, "mod {};", file_name); + deal_problem(&problem, &code); break; } } @@ -274,3 +238,43 @@ fn deal_solving(id: &u32) { .unwrap(); writeln!(lib_file, "mod {};", solution_name); } + +fn deal_problem(problem: &Problem, code: &CodeDefinition) { + let file_name = format!( + "p{:04}_{}", + problem.question_id, + problem.title_slug.replace("-", "_") + ); + let file_path = Path::new("./src/problem").join(format!("{}.rs", file_name)); + if file_path.exists() { + panic!("problem already initialized"); + } + + let template = fs::read_to_string("./template.rs").unwrap(); + let source = template + .replace("__PROBLEM_TITLE__", &problem.title) + .replace("__PROBLEM_DESC__", &build_desc(&problem.content)) + .replace( + "__PROBLEM_DEFAULT_CODE__", + &insert_return_in_code(&problem.return_type, &code.default_code), + ) + .replace("__PROBLEM_ID__", &format!("{}", problem.question_id)) + .replace("__EXTRA_USE__", &parse_extra_use(&code.default_code)); + + let mut file = fs::OpenOptions::new() + .write(true) + .create(true) + .truncate(true) + .open(&file_path) + .unwrap(); + + file.write_all(source.as_bytes()).unwrap(); + drop(file); + + let mut lib_file = fs::OpenOptions::new() + .write(true) + .append(true) + .open("./src/problem/mod.rs") + .unwrap(); + writeln!(lib_file, "mod {};", file_name); +} From 0d9c9f98bdf6b78cd83b995ba430e44b20cbdb11 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 14:51:13 +0800 Subject: [PATCH 23/47] make code work --- Cargo.lock | 486 +++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 + src/fetcher.rs | 50 ++++- src/main.rs | 41 ++++- 4 files changed, 574 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 69f4ab42..a282f353 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,6 +13,11 @@ dependencies = [ "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "anyhow" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "arrayvec" version = "0.4.11" @@ -59,6 +64,11 @@ name = "bitflags" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bumpalo" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "1.3.2" @@ -149,6 +159,14 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-channel" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-deque" version = "0.7.1" @@ -188,6 +206,35 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "curl" +version = "0.4.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "curl-sys 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.50 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "curl-sys" +version = "0.4.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libnghttp2-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.50 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "dtoa" version = "0.4.4" @@ -288,6 +335,48 @@ name = "futures" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-channel" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-channel-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-core-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "futures-cpupool" version = "0.1.8" @@ -297,6 +386,110 @@ dependencies = [ "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "futures-executor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-executor-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-io" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-io-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-executor-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-sink" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-sink-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-util" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-util-preview" +version = "0.3.0-alpha.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "getrandom" version = "0.1.12" @@ -324,6 +517,14 @@ dependencies = [ "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "http" version = "0.1.18" @@ -424,11 +625,38 @@ dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "isahc" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "sluice 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "js-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -447,12 +675,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "leetcode-rust" version = "0.1.0" dependencies = [ + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", + "surf 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -460,6 +690,26 @@ name = "libc" version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "libnghttp2-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "libz-sys" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "lock_api" version = "0.3.1" @@ -576,6 +826,15 @@ name = "nodrop" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num_cpus" version = "1.10.1" @@ -648,6 +907,11 @@ name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pin-utils" +version = "0.1.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pkg-config" version = "0.3.16" @@ -658,6 +922,21 @@ name = "ppv-lite86" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "proc-macro-hack" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro-nested" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "proc-macro2" version = "0.4.30" @@ -1008,16 +1287,53 @@ dependencies = [ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "serde_urlencoded" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "sluice" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "smallvec" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "socket2" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "string" version = "0.2.1" @@ -1026,6 +1342,27 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "surf" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", + "isahc 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "syn" version = "0.15.44" @@ -1248,6 +1585,11 @@ dependencies = [ "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicode-xid" version = "0.1.0" @@ -1311,6 +1653,105 @@ name = "wasi" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wasm-bindgen" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "web-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "weedle" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -1360,12 +1801,14 @@ dependencies = [ [metadata] "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" +"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" "checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" "checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" "checksum backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5" "checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a606a02debe2813760609f57a64a2ffd27d9fdf5b2f133eaca0b248dd92cdd2" +"checksum bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" @@ -1377,10 +1820,13 @@ dependencies = [ "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +"checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" "checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" +"checksum curl 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "06aa71e9208a54def20792d877bc663d6aae0732b9852e612c4a933177c31283" +"checksum curl-sys 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "0c38ca47d60b86d0cc9d42caa90a0885669c2abc9791f871c81f58cdf39e979b" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" @@ -1395,9 +1841,26 @@ dependencies = [ "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" +"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" +"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +"checksum futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" +"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +"checksum futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" +"checksum futures-executor-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "75236e88bd9fe88e5e8bfcd175b665d0528fe03ca4c5207fabc028c8f9d93e98" +"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +"checksum futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "f4914ae450db1921a56c91bde97a27846287d062087d4a652efc09bb3a01ebda" +"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" +"checksum futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3b1dce2a0267ada5c6ff75a8ba864b4e679a9e2aa44262af7a3b5516d530d76e" +"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +"checksum futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec" +"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" +"checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" "checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" @@ -1407,10 +1870,14 @@ dependencies = [ "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" "checksum iovec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c9636900aa73ffed13cdbb199f17cd955670bb300927c8d25b517dfa136b6567" +"checksum isahc 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "17b77027f12e53ae59a379f7074259d32eb10867e6183388020e922832d9c3fb" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" +"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" +"checksum libnghttp2-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02254d44f4435dd79e695f2c2b83cd06a47919adea30216ceaf0c57ca0a72463" +"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" "checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" @@ -1424,6 +1891,7 @@ dependencies = [ "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" "checksum openssl 0.10.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2f372b2b53ce10fb823a337aaa674e3a7d072b957c6264d0f4ff0bd86e657449" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" @@ -1432,8 +1900,11 @@ dependencies = [ "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "72d5370d90f49f70bd033c3d75e87fc529fbfff9d6f7cccef07d6170079d91ea" "checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" +"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" +"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90cf5f418035b98e655e9cdb225047638296b862b42411c4e45bb88d700f7fc0" "checksum publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9bf259a81de2b2eb9850ec990ec78e6a25319715584fd7652b9b26f96fcb1510" @@ -1472,9 +1943,14 @@ dependencies = [ "checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" "checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" +"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum sluice 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7d06dfb3e8743bc19e6de8a302277471d08077d68946b307280496dc5a3531" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" +"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" +"checksum surf 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "741a8008f8a833ef16f47df94a30754478fb2c2bf822b9c2e6f7f09203b97ace" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" @@ -1496,6 +1972,7 @@ dependencies = [ "checksum unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2e2e6bd1e59e56598518beb94fd6db628ded570326f0a98c679a304bd9f00150" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" @@ -1505,6 +1982,15 @@ dependencies = [ "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" "checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" +"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" +"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" +"checksum wasm-bindgen-futures 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c" +"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" +"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" +"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" +"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" +"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" +"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Cargo.toml b/Cargo.toml index f6b7c1c5..9fdbe995 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,8 @@ serde_json = "1.0" serde_derive = "1.0" rand = "0.6.5" regex = "1.3.4" +futures = { version = "0.3.3", features = ["thread-pool"] } +surf = "1.0.3" [lib] doctest = false diff --git a/src/fetcher.rs b/src/fetcher.rs index a60fb39e..85db1424 100644 --- a/src/fetcher.rs +++ b/src/fetcher.rs @@ -54,7 +54,49 @@ pub fn get_problem(frontend_question_id: u32) -> Option { None } -fn get_problems() -> Option { +pub async fn get_problem_async(problem_stat: StatWithStatus) -> Option { + if problem_stat.paid_only { + println!( + "Problem {} is paid-only", + &problem_stat.stat.frontend_question_id + ); + return None; + } + let resp = surf::post(GRAPHQL_URL).body_json(&Query::question_query( + problem_stat.stat.question_title_slug.as_ref().unwrap(), + )); + if resp.is_err() { + println!( + "Problem {} not initialized due to some error", + &problem_stat.stat.frontend_question_id + ); + return None; + } + let resp = resp.unwrap().recv_json().await; + if resp.is_err() { + println!( + "Problem {} not initialized due to some error", + &problem_stat.stat.frontend_question_id + ); + return None; + } + let resp: RawProblem = resp.unwrap(); + return Some(Problem { + title: problem_stat.stat.question_title.clone().unwrap(), + title_slug: problem_stat.stat.question_title_slug.clone().unwrap(), + code_definition: serde_json::from_str(&resp.data.question.code_definition).unwrap(), + content: resp.data.question.content, + sample_test_case: resp.data.question.sample_test_case, + difficulty: problem_stat.difficulty.to_string(), + question_id: problem_stat.stat.frontend_question_id, + return_type: { + let v: Value = serde_json::from_str(&resp.data.question.meta_data).unwrap(); + v["return"]["type"].to_string().replace("\"", "") + }, + }); +} + +pub fn get_problems() -> Option { reqwest::get(PROBLEMS_URL).unwrap().json().unwrap() } @@ -121,18 +163,18 @@ struct Question { } #[derive(Debug, Serialize, Deserialize)] -struct Problems { +pub struct Problems { user_name: String, num_solved: u32, num_total: u32, ac_easy: u32, ac_medium: u32, ac_hard: u32, - stat_status_pairs: Vec, + pub stat_status_pairs: Vec, } #[derive(Debug, Serialize, Deserialize)] -struct StatWithStatus { +pub struct StatWithStatus { stat: Stat, difficulty: Difficulty, paid_only: bool, diff --git a/src/main.rs b/src/main.rs index 677fb3d6..1e78c3a0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,6 +14,12 @@ use std::io; use std::io::{BufRead, Write}; use std::path::Path; +use futures::executor::block_on; +use futures::executor::ThreadPool; +use futures::future::join_all; +use futures::stream::StreamExt; +use futures::task::SpawnExt; + /// main() helps to generate the submission template .rs fn main() { println!("Welcome to leetcode-rust system."); @@ -31,6 +37,7 @@ fn main() { let random_pattern = Regex::new(r"^random$").unwrap(); let solving_pattern = Regex::new(r"^solve (\d+)$").unwrap(); + let all_pattern = Regex::new(r"^all$").unwrap(); if random_pattern.is_match(id_arg) { println!("You select random mode."); @@ -51,6 +58,35 @@ fn main() { .unwrap(); deal_solving(&id); break; + } else if all_pattern.is_match(id_arg) { + // deal all problems + let pool = ThreadPool::new().unwrap(); + let mut tasks = vec![]; + let problems = fetcher::get_problems().unwrap(); + for stat in problems.stat_status_pairs { + tasks.push( + pool.spawn_with_handle(async move { + let problem = fetcher::get_problem_async(stat).await; + if problem.is_none() { + return; + } + let problem = problem.unwrap(); + let code = problem + .code_definition + .iter() + .find(|&d| d.value == "rust".to_string()); + if code.is_none() { + println!("Problem {} has no rust version.", id); + return; + } + let code = code.unwrap(); + async { deal_problem(&problem, &code) }.await + }) + .unwrap(), + ); + } + block_on(join_all(tasks)); + break; } else { id = id_arg .parse::() @@ -68,7 +104,10 @@ fn main() { id ) }); - let code = problem.code_definition.iter().find(|&d| d.value == "rust"); + let code = problem + .code_definition + .iter() + .find(|&d| d.value == "rust".to_string()); if code.is_none() { println!("Problem {} has no rust version.", &id); initialized_ids.push(problem.question_id); From ccd52d0c14329dc20bffef71a3736fd479e78d7f Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 15:31:36 +0800 Subject: [PATCH 24/47] write mod file separately --- src/fetcher.rs | 8 ++++---- src/main.rs | 41 ++++++++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/fetcher.rs b/src/fetcher.rs index 85db1424..a15dd6b2 100644 --- a/src/fetcher.rs +++ b/src/fetcher.rs @@ -175,7 +175,7 @@ pub struct Problems { #[derive(Debug, Serialize, Deserialize)] pub struct StatWithStatus { - stat: Stat, + pub stat: Stat, difficulty: Difficulty, paid_only: bool, is_favor: bool, @@ -184,19 +184,19 @@ pub struct StatWithStatus { } #[derive(Debug, Serialize, Deserialize)] -struct Stat { +pub struct Stat { question_id: u32, #[serde(rename = "question__article__slug")] question_article_slug: Option, #[serde(rename = "question__title")] question_title: Option, #[serde(rename = "question__title_slug")] - question_title_slug: Option, + pub question_title_slug: Option, #[serde(rename = "question__hide")] question_hide: bool, total_acs: u32, total_submitted: u32, - frontend_question_id: u32, + pub frontend_question_id: u32, is_new_question: bool, } diff --git a/src/main.rs b/src/main.rs index 1e78c3a0..9b10a7a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,10 +63,21 @@ fn main() { let pool = ThreadPool::new().unwrap(); let mut tasks = vec![]; let problems = fetcher::get_problems().unwrap(); - for stat in problems.stat_status_pairs { + let mut mod_file_addon = vec![]; + for problem_stat in problems.stat_status_pairs { + mod_file_addon.push(format!( + "mod p{:04}_{};", + problem_stat.stat.frontend_question_id, + problem_stat + .stat + .question_title_slug + .clone() + .unwrap() + .replace("-", "_") + )); tasks.push( pool.spawn_with_handle(async move { - let problem = fetcher::get_problem_async(stat).await; + let problem = fetcher::get_problem_async(problem_stat).await; if problem.is_none() { return; } @@ -80,12 +91,18 @@ fn main() { return; } let code = code.unwrap(); - async { deal_problem(&problem, &code) }.await + async { deal_problem(&problem, &code, false) }.await }) .unwrap(), ); } block_on(join_all(tasks)); + let mut lib_file = fs::OpenOptions::new() + .write(true) + .append(true) + .open("./src/problem/mod.rs") + .unwrap(); + writeln!(lib_file, "{}", mod_file_addon.join("\n")); break; } else { id = id_arg @@ -114,7 +131,7 @@ fn main() { continue; } let code = code.unwrap(); - deal_problem(&problem, &code); + deal_problem(&problem, &code, true); break; } } @@ -278,7 +295,7 @@ fn deal_solving(id: &u32) { writeln!(lib_file, "mod {};", solution_name); } -fn deal_problem(problem: &Problem, code: &CodeDefinition) { +fn deal_problem(problem: &Problem, code: &CodeDefinition, write_mod_file: bool) { let file_name = format!( "p{:04}_{}", problem.question_id, @@ -310,10 +327,12 @@ fn deal_problem(problem: &Problem, code: &CodeDefinition) { file.write_all(source.as_bytes()).unwrap(); drop(file); - let mut lib_file = fs::OpenOptions::new() - .write(true) - .append(true) - .open("./src/problem/mod.rs") - .unwrap(); - writeln!(lib_file, "mod {};", file_name); + if write_mod_file { + let mut lib_file = fs::OpenOptions::new() + .write(true) + .append(true) + .open("./src/problem/mod.rs") + .unwrap(); + writeln!(lib_file, "mod {};", file_name); + } } From 6bfeb47d69f4327107f93c27acc8b13e67c49fb6 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 15:35:44 +0800 Subject: [PATCH 25/47] fix --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9b10a7a9..755bcbd7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -87,7 +87,7 @@ fn main() { .iter() .find(|&d| d.value == "rust".to_string()); if code.is_none() { - println!("Problem {} has no rust version.", id); + println!("Problem {} has no rust version.", problem.question_id); return; } let code = code.unwrap(); From 88741beff4fb5e168fe856ca8212971b5f70f4a1 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 15:44:38 +0800 Subject: [PATCH 26/47] use arc mutex --- src/fetcher.rs | 8 ++++---- src/main.rs | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/fetcher.rs b/src/fetcher.rs index a15dd6b2..85db1424 100644 --- a/src/fetcher.rs +++ b/src/fetcher.rs @@ -175,7 +175,7 @@ pub struct Problems { #[derive(Debug, Serialize, Deserialize)] pub struct StatWithStatus { - pub stat: Stat, + stat: Stat, difficulty: Difficulty, paid_only: bool, is_favor: bool, @@ -184,19 +184,19 @@ pub struct StatWithStatus { } #[derive(Debug, Serialize, Deserialize)] -pub struct Stat { +struct Stat { question_id: u32, #[serde(rename = "question__article__slug")] question_article_slug: Option, #[serde(rename = "question__title")] question_title: Option, #[serde(rename = "question__title_slug")] - pub question_title_slug: Option, + question_title_slug: Option, #[serde(rename = "question__hide")] question_hide: bool, total_acs: u32, total_submitted: u32, - pub frontend_question_id: u32, + frontend_question_id: u32, is_new_question: bool, } diff --git a/src/main.rs b/src/main.rs index 755bcbd7..fd9f434f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ use futures::executor::ThreadPool; use futures::future::join_all; use futures::stream::StreamExt; use futures::task::SpawnExt; +use std::sync::{Arc, Mutex}; /// main() helps to generate the submission template .rs fn main() { @@ -63,18 +64,9 @@ fn main() { let pool = ThreadPool::new().unwrap(); let mut tasks = vec![]; let problems = fetcher::get_problems().unwrap(); - let mut mod_file_addon = vec![]; + let mut mod_file_addon = Arc::new(Mutex::new(vec![])); for problem_stat in problems.stat_status_pairs { - mod_file_addon.push(format!( - "mod p{:04}_{};", - problem_stat.stat.frontend_question_id, - problem_stat - .stat - .question_title_slug - .clone() - .unwrap() - .replace("-", "_") - )); + let mod_file_addon = mod_file_addon.clone(); tasks.push( pool.spawn_with_handle(async move { let problem = fetcher::get_problem_async(problem_stat).await; @@ -90,6 +82,14 @@ fn main() { println!("Problem {} has no rust version.", problem.question_id); return; } + async { + mod_file_addon.lock().unwrap().push(format!( + "mod p{:04}_{};", + problem.question_id, + problem.title_slug.replace("-", "_") + )); + } + .await; let code = code.unwrap(); async { deal_problem(&problem, &code, false) }.await }) @@ -102,7 +102,7 @@ fn main() { .append(true) .open("./src/problem/mod.rs") .unwrap(); - writeln!(lib_file, "{}", mod_file_addon.join("\n")); + writeln!(lib_file, "{}", mod_file_addon.lock().unwrap().join("\n")); break; } else { id = id_arg From 29e4dd6adaac5ae9eef00839f6768d8f73bc0a84 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 15:50:32 +0800 Subject: [PATCH 27/47] fix --- src/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index fd9f434f..60683184 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,10 +23,15 @@ use std::sync::{Arc, Mutex}; /// main() helps to generate the submission template .rs fn main() { - println!("Welcome to leetcode-rust system."); + println!("Welcome to leetcode-rust system.\n"); let mut initialized_ids = get_initialized_ids(); loop { - println!("Please enter a frontend problem id, or \"random\" to generate a random one, or \"solve $i\" to move problem to solution/"); + println!( + "Please enter a frontend problem id, \n\ + or \"random\" to generate a random one, \n\ + or \"solve $i\" to move problem to solution/, \n\ + or \"all\" to initialize all problems" + ); let mut is_random = false; let mut is_solving = false; let mut id: u32 = 0; From 4aa113b7db747d58cd85e40b3d9cfba6024d934d Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 16:12:07 +0800 Subject: [PATCH 28/47] fix --- src/fetcher.rs | 6 +++--- src/main.rs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/fetcher.rs b/src/fetcher.rs index 85db1424..c356dee8 100644 --- a/src/fetcher.rs +++ b/src/fetcher.rs @@ -175,7 +175,7 @@ pub struct Problems { #[derive(Debug, Serialize, Deserialize)] pub struct StatWithStatus { - stat: Stat, + pub stat: Stat, difficulty: Difficulty, paid_only: bool, is_favor: bool, @@ -184,7 +184,7 @@ pub struct StatWithStatus { } #[derive(Debug, Serialize, Deserialize)] -struct Stat { +pub struct Stat { question_id: u32, #[serde(rename = "question__article__slug")] question_article_slug: Option, @@ -196,7 +196,7 @@ struct Stat { question_hide: bool, total_acs: u32, total_submitted: u32, - frontend_question_id: u32, + pub frontend_question_id: u32, is_new_question: bool, } diff --git a/src/main.rs b/src/main.rs index 60683184..5f763bdf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,7 +30,7 @@ fn main() { "Please enter a frontend problem id, \n\ or \"random\" to generate a random one, \n\ or \"solve $i\" to move problem to solution/, \n\ - or \"all\" to initialize all problems" + or \"all\" to initialize all problems \n" ); let mut is_random = false; let mut is_solving = false; @@ -71,6 +71,9 @@ fn main() { let problems = fetcher::get_problems().unwrap(); let mut mod_file_addon = Arc::new(Mutex::new(vec![])); for problem_stat in problems.stat_status_pairs { + if initialized_ids.contains(&problem_stat.stat.frontend_question_id) { + continue; + } let mod_file_addon = mod_file_addon.clone(); tasks.push( pool.spawn_with_handle(async move { From 34c2b0d77abcc433e044451b257e6b9e0f24bc92 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 7 Feb 2020 16:39:58 +0800 Subject: [PATCH 29/47] add comment --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 5f763bdf..ae16b34d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,6 +90,7 @@ fn main() { println!("Problem {} has no rust version.", problem.question_id); return; } + // not sure this can be async async { mod_file_addon.lock().unwrap().push(format!( "mod p{:04}_{};", @@ -99,6 +100,8 @@ fn main() { } .await; let code = code.unwrap(); + // not sure this can be async + // maybe should use async-std io async { deal_problem(&problem, &code, false) }.await }) .unwrap(), From d01f4f4e39d2296669b2997990b25d2f592fd6bd Mon Sep 17 00:00:00 2001 From: songyzh Date: Thu, 13 Feb 2020 20:39:40 +0800 Subject: [PATCH 30/47] add problem link and discuss link --- src/main.rs | 15 ++++++++++++++- template.rs | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ae16b34d..6fecf106 100644 --- a/src/main.rs +++ b/src/main.rs @@ -188,6 +188,17 @@ fn parse_extra_use(code: &str) -> String { extra_use_line } +fn parse_problem_link(problem: &Problem) -> String { + format!("https://leetcode.com/problems/{}/", problem.title_slug) +} + +fn parse_discuss_link(problem: &Problem) -> String { + format!( + "https://leetcode.com/problems/{}/discuss/?currentPage=1&orderBy=most_votes&query=", + problem.title_slug + ) +} + fn insert_return_in_code(return_type: &str, code: &str) -> String { let re = Regex::new(r"\{[ \n]+}").unwrap(); match return_type { @@ -326,7 +337,9 @@ fn deal_problem(problem: &Problem, code: &CodeDefinition, write_mod_file: bool) &insert_return_in_code(&problem.return_type, &code.default_code), ) .replace("__PROBLEM_ID__", &format!("{}", problem.question_id)) - .replace("__EXTRA_USE__", &parse_extra_use(&code.default_code)); + .replace("__EXTRA_USE__", &parse_extra_use(&code.default_code)) + .replace("__PROBLEM_LINK__", &parse_problem_link(problem)) + .replace("__DISCUSS_LINK__", &parse_discuss_link(problem)); let mut file = fs::OpenOptions::new() .write(true) diff --git a/template.rs b/template.rs index 06c5c06d..11411f01 100644 --- a/template.rs +++ b/template.rs @@ -5,6 +5,9 @@ */ pub struct Solution {}__EXTRA_USE__ +// problem: __PROBLEM_LINK__ +// discuss: __DISCUSS_LINK__ + // submission codes start here __PROBLEM_DEFAULT_CODE__ From 089fb47748c12e8264e503b8d590fbd1ac6dc571 Mon Sep 17 00:00:00 2001 From: songyzh Date: Thu, 13 Feb 2020 20:42:50 +0800 Subject: [PATCH 31/47] fix --- template.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template.rs b/template.rs index 11411f01..9a860fe3 100644 --- a/template.rs +++ b/template.rs @@ -5,15 +5,15 @@ */ pub struct Solution {}__EXTRA_USE__ -// problem: __PROBLEM_LINK__ -// discuss: __DISCUSS_LINK__ - // submission codes start here __PROBLEM_DEFAULT_CODE__ // submission codes end +// problem: __PROBLEM_LINK__ +// discuss: __DISCUSS_LINK__ + #[cfg(test)] mod tests { use super::*; From e62f13afe8c69b69ca8b2949179c02ff706a7d58 Mon Sep 17 00:00:00 2001 From: songyzh Date: Fri, 14 Feb 2020 11:10:29 +0800 Subject: [PATCH 32/47] fix --- template.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template.rs b/template.rs index 9a860fe3..11411f01 100644 --- a/template.rs +++ b/template.rs @@ -5,15 +5,15 @@ */ pub struct Solution {}__EXTRA_USE__ +// problem: __PROBLEM_LINK__ +// discuss: __DISCUSS_LINK__ + // submission codes start here __PROBLEM_DEFAULT_CODE__ // submission codes end -// problem: __PROBLEM_LINK__ -// discuss: __DISCUSS_LINK__ - #[cfg(test)] mod tests { use super::*; From 0e99959a973590429c77aaa25bfbaa3b1be3d422 Mon Sep 17 00:00:00 2001 From: songyzh Date: Wed, 19 Feb 2020 22:36:33 +0800 Subject: [PATCH 33/47] rename --- src/solution/mod.rs | 416 +++++++++--------- ...substring_without_repeating_characters.rs} | 0 2 files changed, 208 insertions(+), 208 deletions(-) rename src/solution/{s0003_longest_substring.rs => s0003_longest_substring_without_repeating_characters.rs} (100%) diff --git a/src/solution/mod.rs b/src/solution/mod.rs index 3b079b74..bc982de9 100644 --- a/src/solution/mod.rs +++ b/src/solution/mod.rs @@ -1,237 +1,237 @@ +mod s0001_two_sum; +mod s0002_add_two_numbers; +mod s0003_longest_substring_without_repeating_characters; +mod s0004_median_of_two_sorted_arrays; +mod s0005_longest_palindromic_substring; mod s0006_zigzag_conversion; -mod s0238_product_of_array_except_self; -mod s0115_distinct_subsequences; -mod s0099_recover_binary_search_tree; -mod s0310_minimum_height_trees; -mod s0128_longest_consecutive_sequence; -mod s0274_h_index; -mod s0241_different_ways_to_add_parentheses; +mod s0007_reverse_integer; +mod s0008_string_to_integer_atoi; +mod s0009_palindrome_number; +mod s0010_regular_expression_matching; +mod s0011_container_with_most_water; +mod s0012_integer_to_roman; +mod s0013_roman_to_integer; +mod s0014_longest_common_prefix; +mod s0015_3sum; +mod s0016_3sum_closest; +mod s0017_letter_combinations_of_a_phone_number; +mod s0018_4sum; +mod s0019_remove_nth_node_from_end_of_list; +mod s0020_valid_parentheses; +mod s0021_merge_two_sorted_lists; +mod s0022_generate_parentheses; +mod s0023_merge_k_sorted_lists; mod s0024_swap_nodes_in_pairs; -mod s0110_balanced_binary_tree; -mod s0093_restore_ip_addresses; -mod s0076_minimum_window_substring; -mod s0124_binary_tree_maximum_path_sum; -mod s0122_best_time_to_buy_and_sell_stock_ii; -mod s0169_majority_element; -mod s0162_find_peak_element; -mod s0095_unique_binary_search_trees_ii; -mod s0155_min_stack; -mod s0040_combination_sum_ii; -mod s0217_contains_duplicate; -mod s0055_jump_game; -mod s0106_construct_binary_tree_from_inorder_and_postorder_traversal; -mod s0145_binary_tree_postorder_traversal; -mod s0079_word_search; -mod s0969_pancake_sorting; -mod s0042_trapping_rain_water; -mod s0108_convert_sorted_array_to_binary_search_tree; -mod s0083_remove_duplicates_from_sorted_list; -mod s0130_surrounded_regions; -mod s0226_invert_binary_tree; +mod s0025_reverse_nodes_in_k_group; +mod s0026_remove_duplicates_from_sorted_array; mod s0027_remove_element; -mod s0188_best_time_to_buy_and_sell_stock_iv; -mod s0204_count_primes; -mod s0268_missing_number; -mod s0214_shortest_palindrome; -mod s0231_power_of_two; -mod s0202_happy_number; -mod s0075_sort_colors; -mod s0066_plus_one; mod s0028_implement_strstr; -mod s0290_word_pattern; -mod s0048_rotate_image; -mod s0089_gray_code; -mod s0147_insertion_sort_list; -mod s0084_largest_rectangle_in_histogram; -mod s0011_container_with_most_water; -mod s0009_palindrome_number; -mod s0058_length_of_last_word; -mod s0080_remove_duplicates_from_sorted_array_ii; +mod s0029_divide_two_integers; mod s0030_substring_with_concatenation_of_all_words; -mod s0060_permutation_sequence; -mod s0071_simplify_path; -mod s0038_count_and_say; -mod s0144_binary_tree_preorder_traversal; -mod s0279_perfect_squares; -mod s0304_range_sum_query_2d_immutable; -mod s0292_nim_game; -mod s0264_ugly_number_ii; -mod s0132_palindrome_partitioning_ii; -mod s0019_remove_nth_node_from_end_of_list; -mod s0136_single_number; -mod s0018_4sum; -mod s0220_contains_duplicate_iii; -mod s0299_bulls_and_cows; -mod s0232_implement_queue_using_stacks; -mod s0100_same_tree; -mod s0171_excel_sheet_column_number; -mod s0087_scramble_string; -mod s0704_binary_search; -mod s0219_contains_duplicate_ii; -mod s0086_partition_list; -mod s0082_remove_duplicates_from_sorted_list_ii; -mod s0228_summary_ranges; -mod s0020_valid_parentheses; -mod s0017_letter_combinations_of_a_phone_number; -mod s0312_burst_balloons; -mod s0306_additive_number; -mod s0283_move_zeroes; -mod s1018_binary_prefix_divisible_by_5; -mod s0201_bitwise_and_of_numbers_range; -mod s0109_convert_sorted_list_to_binary_search_tree; -mod s0101_symmetric_tree; -mod s0098_validate_binary_search_tree; +mod s0031_next_permutation; +mod s0032_longest_valid_parentheses; +mod s0033_search_in_rotated_sorted_array; +mod s0034_find_first_and_last_position_of_element_in_sorted_array; mod s0035_search_insert_position; -mod s0050_powx_n; -mod s0198_house_robber; -mod s0004_median_of_two_sorted_arrays; -mod s0221_maximal_square; +mod s0036_valid_sudoku; +mod s0037_sudoku_solver; +mod s0038_count_and_say; +mod s0039_combination_sum; +mod s0040_combination_sum_ii; +mod s0041_first_missing_positive; +mod s0042_trapping_rain_water; +mod s0043_multiply_strings; +mod s0044_wildcard_matching; +mod s0045_jump_game_ii; +mod s0046_permutations; mod s0047_permutations_ii; -mod s0172_factorial_trailing_zeroes; -mod s0054_spiral_matrix; +mod s0048_rotate_image; +mod s0049_group_anagrams; +mod s0050_powx_n; +mod s0051_n_queens; +mod s0052_n_queens_ii; mod s0053_maximum_subarray; -mod s1046_last_stone_weight; -mod s0146_lru_cache; -mod s0126_word_ladder_ii; -mod s0242_valid_anagram; -mod s0112_path_sum; -mod s0023_merge_k_sorted_lists; -mod s0230_kth_smallest_element_in_a_bst; -mod s0104_maximum_depth_of_binary_tree; -mod s0258_add_digits; -mod s0187_repeated_dna_sequences; -mod s0025_reverse_nodes_in_k_group; -mod s0039_combination_sum; -mod s0107_binary_tree_level_order_traversal_ii; -mod s0091_decode_ways; +mod s0054_spiral_matrix; +mod s0055_jump_game; mod s0056_merge_intervals; +mod s0057_insert_interval; +mod s0058_length_of_last_word; +mod s0059_spiral_matrix_ii; +mod s0060_permutation_sequence; +mod s0061_rotate_list; +mod s0062_unique_paths; +mod s0063_unique_paths_ii; +mod s0064_minimum_path_sum; mod s0065_valid_number; -mod s0016_3sum_closest; -mod s0096_unique_binary_search_trees; +mod s0066_plus_one; +mod s0067_add_binary; +mod s0068_text_justification; +mod s0069_sqrtx; +mod s0070_climbing_stairs; +mod s0071_simplify_path; mod s0072_edit_distance; -mod s0044_wildcard_matching; -mod s0239_sliding_window_maximum; -mod s0174_dungeon_game; mod s0073_set_matrix_zeroes; +mod s0074_search_a_2d_matrix; +mod s0075_sort_colors; +mod s0076_minimum_window_substring; +mod s0077_combinations; mod s0078_subsets; -mod s0037_sudoku_solver; -mod s0033_search_in_rotated_sorted_array; -mod s0002_add_two_numbers; -mod s0313_super_ugly_number; -mod s0068_text_justification; -mod s0064_minimum_path_sum; -mod s0218_the_skyline_problem; -mod s0125_valid_palindrome; -mod s0210_course_schedule_ii; -mod s0143_reorder_list; -mod s0164_maximum_gap; +mod s0079_word_search; +mod s0080_remove_duplicates_from_sorted_array_ii; +mod s0081_search_in_rotated_sorted_array_ii; +mod s0082_remove_duplicates_from_sorted_list_ii; +mod s0083_remove_duplicates_from_sorted_list; +mod s0084_largest_rectangle_in_histogram; +mod s0085_maximal_rectangle; +mod s0086_partition_list; +mod s0087_scramble_string; +mod s0088_merge_sorted_array; +mod s0089_gray_code; +mod s0090_subsets_ii; +mod s0091_decode_ways; +mod s0092_reverse_linked_list_ii; +mod s0093_restore_ip_addresses; +mod s0094_binary_tree_inorder_traversal; +mod s0095_unique_binary_search_trees_ii; +mod s0096_unique_binary_search_trees; mod s0097_interleaving_string; +mod s0098_validate_binary_search_tree; +mod s0099_recover_binary_search_tree; +mod s0100_same_tree; +mod s0101_symmetric_tree; +mod s0102_binary_tree_level_order_traversal; +mod s0103_binary_tree_zigzag_level_order_traversal; +mod s0104_maximum_depth_of_binary_tree; mod s0105_construct_binary_tree_from_preorder_and_inorder_traversal; -mod s0167_two_sum_ii_input_array_is_sorted; -mod s0034_find_first_and_last_position_of_element_in_sorted_array; -mod s0094_binary_tree_inorder_traversal; -mod s0052_n_queens_ii; +mod s0106_construct_binary_tree_from_inorder_and_postorder_traversal; +mod s0107_binary_tree_level_order_traversal_ii; +mod s0108_convert_sorted_array_to_binary_search_tree; +mod s0109_convert_sorted_list_to_binary_search_tree; +mod s0110_balanced_binary_tree; +mod s0111_minimum_depth_of_binary_tree; +mod s0112_path_sum; +mod s0113_path_sum_ii; +mod s0114_flatten_binary_tree_to_linked_list; +mod s0115_distinct_subsequences; +mod s0118_pascals_triangle; +mod s0119_pascals_triangle_ii; +mod s0120_triangle; mod s0121_best_time_to_buy_and_sell_stock; -mod s0273_integer_to_english_words; -mod s0225_implement_stack_using_queues; -mod s0046_permutations; -mod s0085_maximal_rectangle; +mod s0122_best_time_to_buy_and_sell_stock_ii; +mod s0123_best_time_to_buy_and_sell_stock_iii; +mod s0124_binary_tree_maximum_path_sum; +mod s0125_valid_palindrome; +mod s0126_word_ladder_ii; +mod s0127_word_ladder; +mod s0128_longest_consecutive_sequence; +mod s0129_sum_root_to_leaf_numbers; +mod s0130_surrounded_regions; +mod s0131_palindrome_partitioning; +mod s0132_palindrome_partitioning_ii; +mod s0134_gas_station; mod s0135_candy; -mod s0113_path_sum_ii; -mod s0029_divide_two_integers; -mod s0260_single_number_iii; +mod s0136_single_number; +mod s0137_single_number_ii; +mod s0139_word_break; mod s0140_word_break_ii; +mod s0143_reorder_list; +mod s0144_binary_tree_preorder_traversal; +mod s0145_binary_tree_postorder_traversal; +mod s0146_lru_cache; +mod s0147_insertion_sort_list; +mod s0148_sort_list; mod s0149_max_points_on_a_line; -mod s0213_house_robber_ii; -mod s0222_count_complete_tree_nodes; -mod s0134_gas_station; -mod s0057_insert_interval; -mod s0173_binary_search_tree_iterator; -mod s0077_combinations; -mod s0005_longest_palindromic_substring; -mod s0041_first_missing_positive; -mod s0026_remove_duplicates_from_sorted_array; +mod s0150_evaluate_reverse_polish_notation; +mod s0151_reverse_words_in_a_string; +mod s0152_maximum_product_subarray; +mod s0153_find_minimum_in_rotated_sorted_array; +mod s0154_find_minimum_in_rotated_sorted_array_ii; +mod s0155_min_stack; +mod s0162_find_peak_element; +mod s0164_maximum_gap; +mod s0165_compare_version_numbers; mod s0166_fraction_to_recurring_decimal; -mod s0119_pascals_triangle_ii; -mod s0012_integer_to_roman; -mod s0223_rectangle_area; -mod s0229_majority_element_ii; -mod s0061_rotate_list; -mod s0123_best_time_to_buy_and_sell_stock_iii; -mod s0301_remove_invalid_parentheses; -mod s0067_add_binary; -mod s0049_group_anagrams; +mod s0167_two_sum_ii_input_array_is_sorted; +mod s0168_excel_sheet_column_title; +mod s0169_majority_element; +mod s0171_excel_sheet_column_number; +mod s0172_factorial_trailing_zeroes; +mod s0173_binary_search_tree_iterator; +mod s0174_dungeon_game; +mod s0179_largest_number; +mod s0187_repeated_dna_sequences; +mod s0188_best_time_to_buy_and_sell_stock_iv; mod s0189_rotate_array; -mod s0001_two_sum; -mod s0275_h_index_ii; -mod s0103_binary_tree_zigzag_level_order_traversal; -mod s0137_single_number_ii; +mod s0198_house_robber; +mod s0199_binary_tree_right_side_view; +mod s0200_number_of_islands; +mod s0201_bitwise_and_of_numbers_range; +mod s0202_happy_number; +mod s0203_remove_linked_list_elements; +mod s0204_count_primes; +mod s0205_isomorphic_strings; +mod s0206_reverse_linked_list; +mod s0207_course_schedule; mod s0208_implement_trie_prefix_tree; -mod s0300_longest_increasing_subsequence; -mod s0118_pascals_triangle; -mod s0010_regular_expression_matching; -mod s0013_roman_to_integer; mod s0209_minimum_size_subarray_sum; +mod s0210_course_schedule_ii; +mod s0211_add_and_search_word_data_structure_design; +mod s0212_word_search_ii; +mod s0213_house_robber_ii; +mod s0214_shortest_palindrome; +mod s0215_kth_largest_element_in_an_array; +mod s0216_combination_sum_iii; +mod s0217_contains_duplicate; +mod s0218_the_skyline_problem; +mod s0219_contains_duplicate_ii; +mod s0220_contains_duplicate_iii; +mod s0221_maximal_square; +mod s0222_count_complete_tree_nodes; +mod s0223_rectangle_area; +mod s0224_basic_calculator; +mod s0225_implement_stack_using_queues; +mod s0226_invert_binary_tree; mod s0227_basic_calculator_ii; -mod s0022_generate_parentheses; -mod s0008_string_to_integer_atoi; -mod s0152_maximum_product_subarray; -mod s0014_longest_common_prefix; -mod s0070_climbing_stairs; +mod s0228_summary_ranges; +mod s0229_majority_element_ii; +mod s0230_kth_smallest_element_in_a_bst; +mod s0231_power_of_two; +mod s0232_implement_queue_using_stacks; mod s0233_number_of_digit_one; -mod s0154_find_minimum_in_rotated_sorted_array_ii; -mod s0127_word_ladder; -mod s0207_course_schedule; -mod s0263_ugly_number; -mod s0295_find_median_from_data_stream; -mod s0148_sort_list; +mod s0238_product_of_array_except_self; +mod s0239_sliding_window_maximum; +mod s0241_different_ways_to_add_parentheses; +mod s0242_valid_anagram; mod s0257_binary_tree_paths; -mod s0120_triangle; -mod s0309_best_time_to_buy_and_sell_stock_with_cooldown; -mod s0074_search_a_2d_matrix; -mod s0215_kth_largest_element_in_an_array; -mod s0203_remove_linked_list_elements; -mod s0081_search_in_rotated_sorted_array_ii; -mod s0059_spiral_matrix_ii; -mod s0151_reverse_words_in_a_string; -mod s0205_isomorphic_strings; -mod s0179_largest_number; -mod s0168_excel_sheet_column_title; -mod s0007_reverse_integer; -mod s0032_longest_valid_parentheses; -mod s0165_compare_version_numbers; -mod s0031_next_permutation; -mod s0088_merge_sorted_array; -mod s0509_fibonacci_number; -mod s0036_valid_sudoku; -mod s0069_sqrtx; -mod s0211_add_and_search_word_data_structure_design; -mod s0114_flatten_binary_tree_to_linked_list; -mod s0224_basic_calculator; -mod s0045_jump_game_ii; -mod s0051_n_queens; -mod s0212_word_search_ii; +mod s0258_add_digits; +mod s0260_single_number_iii; +mod s0263_ugly_number; +mod s0264_ugly_number_ii; +mod s0268_missing_number; +mod s0273_integer_to_english_words; +mod s0274_h_index; +mod s0275_h_index_ii; +mod s0279_perfect_squares; +mod s0282_expression_add_operators; +mod s0283_move_zeroes; mod s0287_find_the_duplicate_number; -mod s0153_find_minimum_in_rotated_sorted_array; mod s0289_game_of_life; -mod s0200_number_of_islands; -mod s0015_3sum; -mod s0216_combination_sum_iii; -mod s0043_multiply_strings; -mod s0090_subsets_ii; -mod s0003_longest_substring; -mod s0139_word_break; -mod s0150_evaluate_reverse_polish_notation; -mod s0063_unique_paths_ii; -mod s0062_unique_paths; -mod s0199_binary_tree_right_side_view; -mod s0282_expression_add_operators; -mod s0021_merge_two_sorted_lists; -mod s0129_sum_root_to_leaf_numbers; -mod s0206_reverse_linked_list; -mod s0131_palindrome_partitioning; -mod s0307_range_sum_query_mutable; -mod s0111_minimum_depth_of_binary_tree; -mod s0092_reverse_linked_list_ii; +mod s0290_word_pattern; +mod s0292_nim_game; +mod s0295_find_median_from_data_stream; +mod s0299_bulls_and_cows; +mod s0300_longest_increasing_subsequence; +mod s0301_remove_invalid_parentheses; mod s0303_range_sum_query_immutable; -mod s0102_binary_tree_level_order_traversal; +mod s0304_range_sum_query_2d_immutable; +mod s0306_additive_number; +mod s0307_range_sum_query_mutable; +mod s0309_best_time_to_buy_and_sell_stock_with_cooldown; +mod s0310_minimum_height_trees; +mod s0312_burst_balloons; +mod s0313_super_ugly_number; +mod s0509_fibonacci_number; +mod s0704_binary_search; +mod s0969_pancake_sorting; +mod s1018_binary_prefix_divisible_by_5; +mod s1046_last_stone_weight; diff --git a/src/solution/s0003_longest_substring.rs b/src/solution/s0003_longest_substring_without_repeating_characters.rs similarity index 100% rename from src/solution/s0003_longest_substring.rs rename to src/solution/s0003_longest_substring_without_repeating_characters.rs From 5baae866fab47cc0fcef837ac965d64f12fde080 Mon Sep 17 00:00:00 2001 From: songyzh Date: Wed, 19 Feb 2020 22:38:06 +0800 Subject: [PATCH 34/47] add start line --- src/solution/s0074_search_a_2d_matrix.rs | 2 ++ src/solution/s0086_partition_list.rs | 2 ++ src/solution/s0149_max_points_on_a_line.rs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/solution/s0074_search_a_2d_matrix.rs b/src/solution/s0074_search_a_2d_matrix.rs index e95f02a3..d535f16e 100644 --- a/src/solution/s0074_search_a_2d_matrix.rs +++ b/src/solution/s0074_search_a_2d_matrix.rs @@ -36,6 +36,8 @@ */ pub struct Solution {} +// submission codes start here + impl Solution { pub fn search_matrix(matrix: Vec>, target: i32) -> bool { if matrix.is_empty() { diff --git a/src/solution/s0086_partition_list.rs b/src/solution/s0086_partition_list.rs index 4238586f..d30a9053 100644 --- a/src/solution/s0086_partition_list.rs +++ b/src/solution/s0086_partition_list.rs @@ -16,6 +16,8 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// submission codes start here + impl Solution { pub fn partition(head: Option>, x: i32) -> Option> { let mut lower = Some(Box::new(ListNode::new(0))); diff --git a/src/solution/s0149_max_points_on_a_line.rs b/src/solution/s0149_max_points_on_a_line.rs index c2faf93b..1b0bf16c 100644 --- a/src/solution/s0149_max_points_on_a_line.rs +++ b/src/solution/s0149_max_points_on_a_line.rs @@ -38,6 +38,8 @@ pub struct Solution {} use crate::util::point::Point; +// submission codes start here + /* 要回顾下高中数学:已知两点, 求解一般式: From 5552d15974f5b03ed14991568e30a4fbda53ecd3 Mon Sep 17 00:00:00 2001 From: songyzh Date: Wed, 19 Feb 2020 22:41:34 +0800 Subject: [PATCH 35/47] add problem and discuss link to existing solutions --- src/solution/s0001_two_sum.rs | 3 +++ src/solution/s0002_add_two_numbers.rs | 3 +++ .../s0003_longest_substring_without_repeating_characters.rs | 3 +++ src/solution/s0004_median_of_two_sorted_arrays.rs | 3 +++ src/solution/s0005_longest_palindromic_substring.rs | 3 +++ src/solution/s0006_zigzag_conversion.rs | 3 +++ src/solution/s0007_reverse_integer.rs | 3 +++ src/solution/s0008_string_to_integer_atoi.rs | 3 +++ src/solution/s0009_palindrome_number.rs | 3 +++ src/solution/s0010_regular_expression_matching.rs | 3 +++ src/solution/s0011_container_with_most_water.rs | 3 +++ src/solution/s0012_integer_to_roman.rs | 3 +++ src/solution/s0013_roman_to_integer.rs | 3 +++ src/solution/s0014_longest_common_prefix.rs | 3 +++ src/solution/s0015_3sum.rs | 3 +++ src/solution/s0016_3sum_closest.rs | 3 +++ src/solution/s0017_letter_combinations_of_a_phone_number.rs | 3 +++ src/solution/s0018_4sum.rs | 3 +++ src/solution/s0019_remove_nth_node_from_end_of_list.rs | 3 +++ src/solution/s0020_valid_parentheses.rs | 3 +++ src/solution/s0021_merge_two_sorted_lists.rs | 3 +++ src/solution/s0022_generate_parentheses.rs | 3 +++ src/solution/s0023_merge_k_sorted_lists.rs | 3 +++ src/solution/s0024_swap_nodes_in_pairs.rs | 3 +++ src/solution/s0025_reverse_nodes_in_k_group.rs | 3 +++ src/solution/s0026_remove_duplicates_from_sorted_array.rs | 3 +++ src/solution/s0027_remove_element.rs | 3 +++ src/solution/s0028_implement_strstr.rs | 3 +++ src/solution/s0029_divide_two_integers.rs | 3 +++ .../s0030_substring_with_concatenation_of_all_words.rs | 3 +++ src/solution/s0031_next_permutation.rs | 3 +++ src/solution/s0032_longest_valid_parentheses.rs | 3 +++ src/solution/s0033_search_in_rotated_sorted_array.rs | 3 +++ ..._find_first_and_last_position_of_element_in_sorted_array.rs | 3 +++ src/solution/s0035_search_insert_position.rs | 3 +++ src/solution/s0036_valid_sudoku.rs | 3 +++ src/solution/s0037_sudoku_solver.rs | 3 +++ src/solution/s0038_count_and_say.rs | 3 +++ src/solution/s0039_combination_sum.rs | 3 +++ src/solution/s0040_combination_sum_ii.rs | 3 +++ src/solution/s0041_first_missing_positive.rs | 3 +++ src/solution/s0042_trapping_rain_water.rs | 3 +++ src/solution/s0043_multiply_strings.rs | 3 +++ src/solution/s0044_wildcard_matching.rs | 3 +++ src/solution/s0045_jump_game_ii.rs | 3 +++ src/solution/s0046_permutations.rs | 3 +++ src/solution/s0047_permutations_ii.rs | 3 +++ src/solution/s0048_rotate_image.rs | 3 +++ src/solution/s0049_group_anagrams.rs | 3 +++ src/solution/s0050_powx_n.rs | 3 +++ src/solution/s0051_n_queens.rs | 3 +++ src/solution/s0052_n_queens_ii.rs | 3 +++ src/solution/s0053_maximum_subarray.rs | 3 +++ src/solution/s0054_spiral_matrix.rs | 3 +++ src/solution/s0055_jump_game.rs | 3 +++ src/solution/s0056_merge_intervals.rs | 3 +++ src/solution/s0057_insert_interval.rs | 3 +++ src/solution/s0058_length_of_last_word.rs | 3 +++ src/solution/s0059_spiral_matrix_ii.rs | 3 +++ src/solution/s0060_permutation_sequence.rs | 3 +++ src/solution/s0061_rotate_list.rs | 3 +++ src/solution/s0062_unique_paths.rs | 3 +++ src/solution/s0063_unique_paths_ii.rs | 3 +++ src/solution/s0064_minimum_path_sum.rs | 3 +++ src/solution/s0065_valid_number.rs | 3 +++ src/solution/s0066_plus_one.rs | 3 +++ src/solution/s0067_add_binary.rs | 3 +++ src/solution/s0068_text_justification.rs | 3 +++ src/solution/s0069_sqrtx.rs | 3 +++ src/solution/s0070_climbing_stairs.rs | 3 +++ src/solution/s0071_simplify_path.rs | 3 +++ src/solution/s0072_edit_distance.rs | 3 +++ src/solution/s0073_set_matrix_zeroes.rs | 3 +++ src/solution/s0074_search_a_2d_matrix.rs | 3 +++ src/solution/s0075_sort_colors.rs | 3 +++ src/solution/s0076_minimum_window_substring.rs | 3 +++ src/solution/s0077_combinations.rs | 3 +++ src/solution/s0078_subsets.rs | 3 +++ src/solution/s0079_word_search.rs | 3 +++ src/solution/s0080_remove_duplicates_from_sorted_array_ii.rs | 3 +++ src/solution/s0081_search_in_rotated_sorted_array_ii.rs | 3 +++ src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs | 3 +++ src/solution/s0083_remove_duplicates_from_sorted_list.rs | 3 +++ src/solution/s0084_largest_rectangle_in_histogram.rs | 3 +++ src/solution/s0085_maximal_rectangle.rs | 3 +++ src/solution/s0086_partition_list.rs | 3 +++ src/solution/s0087_scramble_string.rs | 3 +++ src/solution/s0088_merge_sorted_array.rs | 3 +++ src/solution/s0089_gray_code.rs | 3 +++ src/solution/s0090_subsets_ii.rs | 3 +++ src/solution/s0091_decode_ways.rs | 3 +++ src/solution/s0092_reverse_linked_list_ii.rs | 3 +++ src/solution/s0093_restore_ip_addresses.rs | 3 +++ src/solution/s0094_binary_tree_inorder_traversal.rs | 3 +++ src/solution/s0095_unique_binary_search_trees_ii.rs | 3 +++ src/solution/s0096_unique_binary_search_trees.rs | 3 +++ src/solution/s0097_interleaving_string.rs | 3 +++ src/solution/s0098_validate_binary_search_tree.rs | 3 +++ src/solution/s0099_recover_binary_search_tree.rs | 3 +++ src/solution/s0100_same_tree.rs | 3 +++ src/solution/s0101_symmetric_tree.rs | 3 +++ src/solution/s0102_binary_tree_level_order_traversal.rs | 3 +++ src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs | 3 +++ src/solution/s0104_maximum_depth_of_binary_tree.rs | 3 +++ ...onstruct_binary_tree_from_preorder_and_inorder_traversal.rs | 3 +++ ...nstruct_binary_tree_from_inorder_and_postorder_traversal.rs | 3 +++ src/solution/s0107_binary_tree_level_order_traversal_ii.rs | 3 +++ .../s0108_convert_sorted_array_to_binary_search_tree.rs | 3 +++ .../s0109_convert_sorted_list_to_binary_search_tree.rs | 3 +++ src/solution/s0110_balanced_binary_tree.rs | 3 +++ src/solution/s0111_minimum_depth_of_binary_tree.rs | 3 +++ src/solution/s0112_path_sum.rs | 3 +++ src/solution/s0113_path_sum_ii.rs | 3 +++ src/solution/s0114_flatten_binary_tree_to_linked_list.rs | 3 +++ src/solution/s0115_distinct_subsequences.rs | 3 +++ src/solution/s0118_pascals_triangle.rs | 3 +++ src/solution/s0119_pascals_triangle_ii.rs | 3 +++ src/solution/s0120_triangle.rs | 3 +++ src/solution/s0121_best_time_to_buy_and_sell_stock.rs | 3 +++ src/solution/s0122_best_time_to_buy_and_sell_stock_ii.rs | 3 +++ src/solution/s0123_best_time_to_buy_and_sell_stock_iii.rs | 3 +++ src/solution/s0124_binary_tree_maximum_path_sum.rs | 3 +++ src/solution/s0125_valid_palindrome.rs | 3 +++ src/solution/s0126_word_ladder_ii.rs | 3 +++ src/solution/s0127_word_ladder.rs | 3 +++ src/solution/s0128_longest_consecutive_sequence.rs | 3 +++ src/solution/s0129_sum_root_to_leaf_numbers.rs | 3 +++ src/solution/s0130_surrounded_regions.rs | 3 +++ src/solution/s0131_palindrome_partitioning.rs | 3 +++ src/solution/s0132_palindrome_partitioning_ii.rs | 3 +++ src/solution/s0134_gas_station.rs | 3 +++ src/solution/s0135_candy.rs | 3 +++ src/solution/s0136_single_number.rs | 3 +++ src/solution/s0137_single_number_ii.rs | 3 +++ src/solution/s0139_word_break.rs | 3 +++ src/solution/s0140_word_break_ii.rs | 3 +++ src/solution/s0143_reorder_list.rs | 3 +++ src/solution/s0144_binary_tree_preorder_traversal.rs | 3 +++ src/solution/s0145_binary_tree_postorder_traversal.rs | 3 +++ src/solution/s0146_lru_cache.rs | 3 +++ src/solution/s0147_insertion_sort_list.rs | 3 +++ src/solution/s0148_sort_list.rs | 3 +++ src/solution/s0149_max_points_on_a_line.rs | 3 +++ src/solution/s0150_evaluate_reverse_polish_notation.rs | 3 +++ src/solution/s0151_reverse_words_in_a_string.rs | 3 +++ src/solution/s0152_maximum_product_subarray.rs | 3 +++ src/solution/s0153_find_minimum_in_rotated_sorted_array.rs | 3 +++ src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs | 3 +++ src/solution/s0155_min_stack.rs | 3 +++ src/solution/s0162_find_peak_element.rs | 3 +++ src/solution/s0164_maximum_gap.rs | 3 +++ src/solution/s0165_compare_version_numbers.rs | 3 +++ src/solution/s0166_fraction_to_recurring_decimal.rs | 3 +++ src/solution/s0167_two_sum_ii_input_array_is_sorted.rs | 3 +++ src/solution/s0168_excel_sheet_column_title.rs | 3 +++ src/solution/s0169_majority_element.rs | 3 +++ src/solution/s0171_excel_sheet_column_number.rs | 3 +++ src/solution/s0172_factorial_trailing_zeroes.rs | 3 +++ src/solution/s0173_binary_search_tree_iterator.rs | 3 +++ src/solution/s0174_dungeon_game.rs | 3 +++ src/solution/s0179_largest_number.rs | 3 +++ src/solution/s0187_repeated_dna_sequences.rs | 3 +++ src/solution/s0188_best_time_to_buy_and_sell_stock_iv.rs | 3 +++ src/solution/s0189_rotate_array.rs | 3 +++ src/solution/s0198_house_robber.rs | 3 +++ src/solution/s0199_binary_tree_right_side_view.rs | 3 +++ src/solution/s0200_number_of_islands.rs | 3 +++ src/solution/s0201_bitwise_and_of_numbers_range.rs | 3 +++ src/solution/s0202_happy_number.rs | 3 +++ src/solution/s0203_remove_linked_list_elements.rs | 3 +++ src/solution/s0204_count_primes.rs | 3 +++ src/solution/s0205_isomorphic_strings.rs | 3 +++ src/solution/s0206_reverse_linked_list.rs | 3 +++ src/solution/s0207_course_schedule.rs | 3 +++ src/solution/s0208_implement_trie_prefix_tree.rs | 3 +++ src/solution/s0209_minimum_size_subarray_sum.rs | 3 +++ src/solution/s0210_course_schedule_ii.rs | 3 +++ .../s0211_add_and_search_word_data_structure_design.rs | 3 +++ src/solution/s0212_word_search_ii.rs | 3 +++ src/solution/s0213_house_robber_ii.rs | 3 +++ src/solution/s0214_shortest_palindrome.rs | 3 +++ src/solution/s0215_kth_largest_element_in_an_array.rs | 3 +++ src/solution/s0216_combination_sum_iii.rs | 3 +++ src/solution/s0217_contains_duplicate.rs | 3 +++ src/solution/s0218_the_skyline_problem.rs | 3 +++ src/solution/s0219_contains_duplicate_ii.rs | 3 +++ src/solution/s0220_contains_duplicate_iii.rs | 3 +++ src/solution/s0221_maximal_square.rs | 3 +++ src/solution/s0222_count_complete_tree_nodes.rs | 3 +++ src/solution/s0223_rectangle_area.rs | 3 +++ src/solution/s0224_basic_calculator.rs | 3 +++ src/solution/s0225_implement_stack_using_queues.rs | 3 +++ src/solution/s0226_invert_binary_tree.rs | 3 +++ src/solution/s0227_basic_calculator_ii.rs | 3 +++ src/solution/s0228_summary_ranges.rs | 3 +++ src/solution/s0229_majority_element_ii.rs | 3 +++ src/solution/s0230_kth_smallest_element_in_a_bst.rs | 3 +++ src/solution/s0231_power_of_two.rs | 3 +++ src/solution/s0232_implement_queue_using_stacks.rs | 3 +++ src/solution/s0233_number_of_digit_one.rs | 3 +++ src/solution/s0238_product_of_array_except_self.rs | 3 +++ src/solution/s0239_sliding_window_maximum.rs | 3 +++ src/solution/s0241_different_ways_to_add_parentheses.rs | 3 +++ src/solution/s0242_valid_anagram.rs | 3 +++ src/solution/s0257_binary_tree_paths.rs | 3 +++ src/solution/s0258_add_digits.rs | 3 +++ src/solution/s0260_single_number_iii.rs | 3 +++ src/solution/s0263_ugly_number.rs | 3 +++ src/solution/s0264_ugly_number_ii.rs | 3 +++ src/solution/s0268_missing_number.rs | 3 +++ src/solution/s0273_integer_to_english_words.rs | 3 +++ src/solution/s0274_h_index.rs | 3 +++ src/solution/s0275_h_index_ii.rs | 3 +++ src/solution/s0279_perfect_squares.rs | 3 +++ src/solution/s0282_expression_add_operators.rs | 3 +++ src/solution/s0283_move_zeroes.rs | 3 +++ src/solution/s0287_find_the_duplicate_number.rs | 3 +++ src/solution/s0289_game_of_life.rs | 3 +++ src/solution/s0290_word_pattern.rs | 3 +++ src/solution/s0292_nim_game.rs | 3 +++ src/solution/s0295_find_median_from_data_stream.rs | 3 +++ src/solution/s0299_bulls_and_cows.rs | 3 +++ src/solution/s0300_longest_increasing_subsequence.rs | 3 +++ src/solution/s0301_remove_invalid_parentheses.rs | 3 +++ src/solution/s0303_range_sum_query_immutable.rs | 3 +++ src/solution/s0304_range_sum_query_2d_immutable.rs | 3 +++ src/solution/s0306_additive_number.rs | 3 +++ src/solution/s0307_range_sum_query_mutable.rs | 3 +++ .../s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs | 3 +++ src/solution/s0310_minimum_height_trees.rs | 3 +++ src/solution/s0312_burst_balloons.rs | 3 +++ src/solution/s0313_super_ugly_number.rs | 3 +++ src/solution/s0509_fibonacci_number.rs | 3 +++ src/solution/s0704_binary_search.rs | 3 +++ src/solution/s0969_pancake_sorting.rs | 3 +++ src/solution/s1018_binary_prefix_divisible_by_5.rs | 3 +++ src/solution/s1046_last_stone_weight.rs | 3 +++ 237 files changed, 711 insertions(+) diff --git a/src/solution/s0001_two_sum.rs b/src/solution/s0001_two_sum.rs index 1d04a13e..4a44a732 100644 --- a/src/solution/s0001_two_sum.rs +++ b/src/solution/s0001_two_sum.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/two-sum/ +// discuss: https://leetcode.com/problems/two-sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashMap; diff --git a/src/solution/s0002_add_two_numbers.rs b/src/solution/s0002_add_two_numbers.rs index 5612c3d4..d8bfc2d8 100644 --- a/src/solution/s0002_add_two_numbers.rs +++ b/src/solution/s0002_add_two_numbers.rs @@ -19,6 +19,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/add-two-numbers/ +// discuss: https://leetcode.com/problems/add-two-numbers/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0003_longest_substring_without_repeating_characters.rs b/src/solution/s0003_longest_substring_without_repeating_characters.rs index dca33069..0ad6903d 100644 --- a/src/solution/s0003_longest_substring_without_repeating_characters.rs +++ b/src/solution/s0003_longest_substring_without_repeating_characters.rs @@ -12,6 +12,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/longest-substring-without-repeating-characters/ +// discuss: https://leetcode.com/problems/longest-substring-without-repeating-characters/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0004_median_of_two_sorted_arrays.rs b/src/solution/s0004_median_of_two_sorted_arrays.rs index b0775e14..e3c2d014 100644 --- a/src/solution/s0004_median_of_two_sorted_arrays.rs +++ b/src/solution/s0004_median_of_two_sorted_arrays.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/median-of-two-sorted-arrays/ +// discuss: https://leetcode.com/problems/median-of-two-sorted-arrays/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO: nth slice diff --git a/src/solution/s0005_longest_palindromic_substring.rs b/src/solution/s0005_longest_palindromic_substring.rs index 26a622ca..675e1951 100644 --- a/src/solution/s0005_longest_palindromic_substring.rs +++ b/src/solution/s0005_longest_palindromic_substring.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/longest-palindromic-substring/ +// discuss: https://leetcode.com/problems/longest-palindromic-substring/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0006_zigzag_conversion.rs b/src/solution/s0006_zigzag_conversion.rs index 43bf5fdc..51ed13a7 100644 --- a/src/solution/s0006_zigzag_conversion.rs +++ b/src/solution/s0006_zigzag_conversion.rs @@ -38,6 +38,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/zigzag-conversion/ +// discuss: https://leetcode.com/problems/zigzag-conversion/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0007_reverse_integer.rs b/src/solution/s0007_reverse_integer.rs index d258809f..ad89eebd 100644 --- a/src/solution/s0007_reverse_integer.rs +++ b/src/solution/s0007_reverse_integer.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/reverse-integer/ +// discuss: https://leetcode.com/problems/reverse-integer/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { pub fn reverse(x: i32) -> i32 { diff --git a/src/solution/s0008_string_to_integer_atoi.rs b/src/solution/s0008_string_to_integer_atoi.rs index 15a1eae1..9c86e17b 100644 --- a/src/solution/s0008_string_to_integer_atoi.rs +++ b/src/solution/s0008_string_to_integer_atoi.rs @@ -61,6 +61,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/string-to-integer-atoi/ +// discuss: https://leetcode.com/problems/string-to-integer-atoi/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0009_palindrome_number.rs b/src/solution/s0009_palindrome_number.rs index 070077a3..255eeed1 100644 --- a/src/solution/s0009_palindrome_number.rs +++ b/src/solution/s0009_palindrome_number.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/palindrome-number/ +// discuss: https://leetcode.com/problems/palindrome-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO: not optimal, we only have to revert half of the string diff --git a/src/solution/s0010_regular_expression_matching.rs b/src/solution/s0010_regular_expression_matching.rs index d600e619..13e15cb7 100644 --- a/src/solution/s0010_regular_expression_matching.rs +++ b/src/solution/s0010_regular_expression_matching.rs @@ -69,6 +69,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/regular-expression-matching/ +// discuss: https://leetcode.com/problems/regular-expression-matching/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO: NFA diff --git a/src/solution/s0011_container_with_most_water.rs b/src/solution/s0011_container_with_most_water.rs index a26dcfb7..ae818bac 100644 --- a/src/solution/s0011_container_with_most_water.rs +++ b/src/solution/s0011_container_with_most_water.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/container-with-most-water/ +// discuss: https://leetcode.com/problems/container-with-most-water/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Brute force: O(N^2) diff --git a/src/solution/s0012_integer_to_roman.rs b/src/solution/s0012_integer_to_roman.rs index 2698956e..b32592c7 100644 --- a/src/solution/s0012_integer_to_roman.rs +++ b/src/solution/s0012_integer_to_roman.rs @@ -61,6 +61,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/integer-to-roman/ +// discuss: https://leetcode.com/problems/integer-to-roman/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0013_roman_to_integer.rs b/src/solution/s0013_roman_to_integer.rs index fcc2c1ad..4f3f0ae4 100644 --- a/src/solution/s0013_roman_to_integer.rs +++ b/src/solution/s0013_roman_to_integer.rs @@ -61,6 +61,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/roman-to-integer/ +// discuss: https://leetcode.com/problems/roman-to-integer/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0014_longest_common_prefix.rs b/src/solution/s0014_longest_common_prefix.rs index 3d3affec..1c5fd985 100644 --- a/src/solution/s0014_longest_common_prefix.rs +++ b/src/solution/s0014_longest_common_prefix.rs @@ -27,6 +27,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/longest-common-prefix/ +// discuss: https://leetcode.com/problems/longest-common-prefix/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::str::Chars; diff --git a/src/solution/s0015_3sum.rs b/src/solution/s0015_3sum.rs index 2d4c9cca..9feb3cd0 100644 --- a/src/solution/s0015_3sum.rs +++ b/src/solution/s0015_3sum.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/3sum/ +// discuss: https://leetcode.com/problems/3sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0016_3sum_closest.rs b/src/solution/s0016_3sum_closest.rs index eee265b5..01cf442d 100644 --- a/src/solution/s0016_3sum_closest.rs +++ b/src/solution/s0016_3sum_closest.rs @@ -14,6 +14,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/3sum-closest/ +// discuss: https://leetcode.com/problems/3sum-closest/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0017_letter_combinations_of_a_phone_number.rs b/src/solution/s0017_letter_combinations_of_a_phone_number.rs index ccd30a82..7d3245f4 100644 --- a/src/solution/s0017_letter_combinations_of_a_phone_number.rs +++ b/src/solution/s0017_letter_combinations_of_a_phone_number.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/letter-combinations-of-a-phone-number/ +// discuss: https://leetcode.com/problems/letter-combinations-of-a-phone-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0018_4sum.rs b/src/solution/s0018_4sum.rs index f74fa5ed..d832aef1 100644 --- a/src/solution/s0018_4sum.rs +++ b/src/solution/s0018_4sum.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/4sum/ +// discuss: https://leetcode.com/problems/4sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO: change to faster N^3 solution... maybe diff --git a/src/solution/s0019_remove_nth_node_from_end_of_list.rs b/src/solution/s0019_remove_nth_node_from_end_of_list.rs index b3dac826..c3f53a32 100644 --- a/src/solution/s0019_remove_nth_node_from_end_of_list.rs +++ b/src/solution/s0019_remove_nth_node_from_end_of_list.rs @@ -23,6 +23,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/remove-nth-node-from-end-of-list/ +// discuss: https://leetcode.com/problems/remove-nth-node-from-end-of-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // one pass (two pointer runner pattern) cannot make borrow checker happy diff --git a/src/solution/s0020_valid_parentheses.rs b/src/solution/s0020_valid_parentheses.rs index 2af69c67..3c0940b9 100644 --- a/src/solution/s0020_valid_parentheses.rs +++ b/src/solution/s0020_valid_parentheses.rs @@ -50,6 +50,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/valid-parentheses/ +// discuss: https://leetcode.com/problems/valid-parentheses/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0021_merge_two_sorted_lists.rs b/src/solution/s0021_merge_two_sorted_lists.rs index c496d8e0..54d7f256 100644 --- a/src/solution/s0021_merge_two_sorted_lists.rs +++ b/src/solution/s0021_merge_two_sorted_lists.rs @@ -13,6 +13,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/merge-two-sorted-lists/ +// discuss: https://leetcode.com/problems/merge-two-sorted-lists/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // recursive will be much easier to understand diff --git a/src/solution/s0022_generate_parentheses.rs b/src/solution/s0022_generate_parentheses.rs index 887aa213..9e0e33df 100644 --- a/src/solution/s0022_generate_parentheses.rs +++ b/src/solution/s0022_generate_parentheses.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/generate-parentheses/ +// discuss: https://leetcode.com/problems/generate-parentheses/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // DFS diff --git a/src/solution/s0023_merge_k_sorted_lists.rs b/src/solution/s0023_merge_k_sorted_lists.rs index c213eb7d..eeaf3695 100644 --- a/src/solution/s0023_merge_k_sorted_lists.rs +++ b/src/solution/s0023_merge_k_sorted_lists.rs @@ -19,6 +19,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/merge-k-sorted-lists/ +// discuss: https://leetcode.com/problems/merge-k-sorted-lists/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cmp::Ordering; use std::collections::BinaryHeap; diff --git a/src/solution/s0024_swap_nodes_in_pairs.rs b/src/solution/s0024_swap_nodes_in_pairs.rs index 104d6b9e..4a6deb3e 100644 --- a/src/solution/s0024_swap_nodes_in_pairs.rs +++ b/src/solution/s0024_swap_nodes_in_pairs.rs @@ -19,6 +19,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/swap-nodes-in-pairs/ +// discuss: https://leetcode.com/problems/swap-nodes-in-pairs/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0025_reverse_nodes_in_k_group.rs b/src/solution/s0025_reverse_nodes_in_k_group.rs index 3beb5528..5d39cd1e 100644 --- a/src/solution/s0025_reverse_nodes_in_k_group.rs +++ b/src/solution/s0025_reverse_nodes_in_k_group.rs @@ -27,6 +27,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/reverse-nodes-in-k-group/ +// discuss: https://leetcode.com/problems/reverse-nodes-in-k-group/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0026_remove_duplicates_from_sorted_array.rs b/src/solution/s0026_remove_duplicates_from_sorted_array.rs index c4b07180..29ae1485 100644 --- a/src/solution/s0026_remove_duplicates_from_sorted_array.rs +++ b/src/solution/s0026_remove_duplicates_from_sorted_array.rs @@ -45,6 +45,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-array/ +// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0027_remove_element.rs b/src/solution/s0027_remove_element.rs index 5c11843b..7144d3e9 100644 --- a/src/solution/s0027_remove_element.rs +++ b/src/solution/s0027_remove_element.rs @@ -49,6 +49,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/remove-element/ +// discuss: https://leetcode.com/problems/remove-element/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0028_implement_strstr.rs b/src/solution/s0028_implement_strstr.rs index b4bbee26..e0d944ee 100644 --- a/src/solution/s0028_implement_strstr.rs +++ b/src/solution/s0028_implement_strstr.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/implement-strstr/ +// discuss: https://leetcode.com/problems/implement-strstr/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0029_divide_two_integers.rs b/src/solution/s0029_divide_two_integers.rs index edff4f40..e8f13435 100644 --- a/src/solution/s0029_divide_two_integers.rs +++ b/src/solution/s0029_divide_two_integers.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/divide-two-integers/ +// discuss: https://leetcode.com/problems/divide-two-integers/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0030_substring_with_concatenation_of_all_words.rs b/src/solution/s0030_substring_with_concatenation_of_all_words.rs index 1c797090..002ae9a3 100644 --- a/src/solution/s0030_substring_with_concatenation_of_all_words.rs +++ b/src/solution/s0030_substring_with_concatenation_of_all_words.rs @@ -26,6 +26,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/substring-with-concatenation-of-all-words/ +// discuss: https://leetcode.com/problems/substring-with-concatenation-of-all-words/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here struct Term { expect: i32, diff --git a/src/solution/s0031_next_permutation.rs b/src/solution/s0031_next_permutation.rs index 459693ec..b448dfa1 100644 --- a/src/solution/s0031_next_permutation.rs +++ b/src/solution/s0031_next_permutation.rs @@ -16,6 +16,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/next-permutation/ +// discuss: https://leetcode.com/problems/next-permutation/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0032_longest_valid_parentheses.rs b/src/solution/s0032_longest_valid_parentheses.rs index c6949519..d970de2b 100644 --- a/src/solution/s0032_longest_valid_parentheses.rs +++ b/src/solution/s0032_longest_valid_parentheses.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/longest-valid-parentheses/ +// discuss: https://leetcode.com/problems/longest-valid-parentheses/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // time: O(N) space: O(1) diff --git a/src/solution/s0033_search_in_rotated_sorted_array.rs b/src/solution/s0033_search_in_rotated_sorted_array.rs index 968199f5..ab5c13d3 100644 --- a/src/solution/s0033_search_in_rotated_sorted_array.rs +++ b/src/solution/s0033_search_in_rotated_sorted_array.rs @@ -37,6 +37,9 @@ pub struct Solution {} Consider the given array as ring, each time we split the ring and judge which part is the target belong to, then it's ordinary binary search. */ +// problem: https://leetcode.com/problems/search-in-rotated-sorted-array/ +// discuss: https://leetcode.com/problems/search-in-rotated-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0034_find_first_and_last_position_of_element_in_sorted_array.rs b/src/solution/s0034_find_first_and_last_position_of_element_in_sorted_array.rs index d13bfb86..eba1c01c 100644 --- a/src/solution/s0034_find_first_and_last_position_of_element_in_sorted_array.rs +++ b/src/solution/s0034_find_first_and_last_position_of_element_in_sorted_array.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/ +// discuss: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO diff --git a/src/solution/s0035_search_insert_position.rs b/src/solution/s0035_search_insert_position.rs index 30921761..31c1c38b 100644 --- a/src/solution/s0035_search_insert_position.rs +++ b/src/solution/s0035_search_insert_position.rs @@ -36,6 +36,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/search-insert-position/ +// discuss: https://leetcode.com/problems/search-insert-position/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO diff --git a/src/solution/s0036_valid_sudoku.rs b/src/solution/s0036_valid_sudoku.rs index 255bab22..5a595774 100644 --- a/src/solution/s0036_valid_sudoku.rs +++ b/src/solution/s0036_valid_sudoku.rs @@ -64,6 +64,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/valid-sudoku/ +// discuss: https://leetcode.com/problems/valid-sudoku/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // just brute force diff --git a/src/solution/s0037_sudoku_solver.rs b/src/solution/s0037_sudoku_solver.rs index a848d26c..d0187582 100644 --- a/src/solution/s0037_sudoku_solver.rs +++ b/src/solution/s0037_sudoku_solver.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/sudoku-solver/ +// discuss: https://leetcode.com/problems/sudoku-solver/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO diff --git a/src/solution/s0038_count_and_say.rs b/src/solution/s0038_count_and_say.rs index 53d1c269..6305b2a5 100644 --- a/src/solution/s0038_count_and_say.rs +++ b/src/solution/s0038_count_and_say.rs @@ -37,6 +37,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/count-and-say/ +// discuss: https://leetcode.com/problems/count-and-say/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::char::from_digit; diff --git a/src/solution/s0039_combination_sum.rs b/src/solution/s0039_combination_sum.rs index e589e9a7..b31e397e 100644 --- a/src/solution/s0039_combination_sum.rs +++ b/src/solution/s0039_combination_sum.rs @@ -38,6 +38,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/combination-sum/ +// discuss: https://leetcode.com/problems/combination-sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0040_combination_sum_ii.rs b/src/solution/s0040_combination_sum_ii.rs index a4a63011..0445bfb9 100644 --- a/src/solution/s0040_combination_sum_ii.rs +++ b/src/solution/s0040_combination_sum_ii.rs @@ -39,6 +39,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/combination-sum-ii/ +// discuss: https://leetcode.com/problems/combination-sum-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0041_first_missing_positive.rs b/src/solution/s0041_first_missing_positive.rs index 72642eb2..80cd8d8e 100644 --- a/src/solution/s0041_first_missing_positive.rs +++ b/src/solution/s0041_first_missing_positive.rs @@ -31,6 +31,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/first-missing-positive/ +// discuss: https://leetcode.com/problems/first-missing-positive/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0042_trapping_rain_water.rs b/src/solution/s0042_trapping_rain_water.rs index d60647dd..9d961994 100644 --- a/src/solution/s0042_trapping_rain_water.rs +++ b/src/solution/s0042_trapping_rain_water.rs @@ -15,6 +15,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/trapping-rain-water/ +// discuss: https://leetcode.com/problems/trapping-rain-water/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO diff --git a/src/solution/s0043_multiply_strings.rs b/src/solution/s0043_multiply_strings.rs index a2400d6c..8c487b8e 100644 --- a/src/solution/s0043_multiply_strings.rs +++ b/src/solution/s0043_multiply_strings.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/multiply-strings/ +// discuss: https://leetcode.com/problems/multiply-strings/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO diff --git a/src/solution/s0044_wildcard_matching.rs b/src/solution/s0044_wildcard_matching.rs index c4156c36..e875131a 100644 --- a/src/solution/s0044_wildcard_matching.rs +++ b/src/solution/s0044_wildcard_matching.rs @@ -69,6 +69,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/wildcard-matching/ +// discuss: https://leetcode.com/problems/wildcard-matching/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0045_jump_game_ii.rs b/src/solution/s0045_jump_game_ii.rs index 1f2de2aa..3922e20b 100644 --- a/src/solution/s0045_jump_game_ii.rs +++ b/src/solution/s0045_jump_game_ii.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/jump-game-ii/ +// discuss: https://leetcode.com/problems/jump-game-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO: shortest path from backward diff --git a/src/solution/s0046_permutations.rs b/src/solution/s0046_permutations.rs index a6cdb8dd..ef9354c8 100644 --- a/src/solution/s0046_permutations.rs +++ b/src/solution/s0046_permutations.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/permutations/ +// discuss: https://leetcode.com/problems/permutations/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0047_permutations_ii.rs b/src/solution/s0047_permutations_ii.rs index 22aef579..7dceb55b 100644 --- a/src/solution/s0047_permutations_ii.rs +++ b/src/solution/s0047_permutations_ii.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/permutations-ii/ +// discuss: https://leetcode.com/problems/permutations-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0048_rotate_image.rs b/src/solution/s0048_rotate_image.rs index 01145b47..6f6fdffa 100644 --- a/src/solution/s0048_rotate_image.rs +++ b/src/solution/s0048_rotate_image.rs @@ -50,6 +50,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/rotate-image/ +// discuss: https://leetcode.com/problems/rotate-image/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // x,y -> y,n-x 2-dimension vector rotate -90 degree: diff --git a/src/solution/s0049_group_anagrams.rs b/src/solution/s0049_group_anagrams.rs index 737dc03b..64200ea3 100644 --- a/src/solution/s0049_group_anagrams.rs +++ b/src/solution/s0049_group_anagrams.rs @@ -24,6 +24,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/group-anagrams/ +// discuss: https://leetcode.com/problems/group-anagrams/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashMap; diff --git a/src/solution/s0050_powx_n.rs b/src/solution/s0050_powx_n.rs index 6e89f90c..3e2e9b3e 100644 --- a/src/solution/s0050_powx_n.rs +++ b/src/solution/s0050_powx_n.rs @@ -35,6 +35,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/powx-n/ +// discuss: https://leetcode.com/problems/powx-n/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0051_n_queens.rs b/src/solution/s0051_n_queens.rs index 98fd9480..d78435a9 100644 --- a/src/solution/s0051_n_queens.rs +++ b/src/solution/s0051_n_queens.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/n-queens/ +// discuss: https://leetcode.com/problems/n-queens/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0052_n_queens_ii.rs b/src/solution/s0052_n_queens_ii.rs index 873cdda5..7c9b1987 100644 --- a/src/solution/s0052_n_queens_ii.rs +++ b/src/solution/s0052_n_queens_ii.rs @@ -29,6 +29,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/n-queens-ii/ +// discuss: https://leetcode.com/problems/n-queens-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0053_maximum_subarray.rs b/src/solution/s0053_maximum_subarray.rs index 72b8b234..7967fb00 100644 --- a/src/solution/s0053_maximum_subarray.rs +++ b/src/solution/s0053_maximum_subarray.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/maximum-subarray/ +// discuss: https://leetcode.com/problems/maximum-subarray/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0054_spiral_matrix.rs b/src/solution/s0054_spiral_matrix.rs index a2a8f009..ac90b769 100644 --- a/src/solution/s0054_spiral_matrix.rs +++ b/src/solution/s0054_spiral_matrix.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/spiral-matrix/ +// discuss: https://leetcode.com/problems/spiral-matrix/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0055_jump_game.rs b/src/solution/s0055_jump_game.rs index a3634424..8dc35842 100644 --- a/src/solution/s0055_jump_game.rs +++ b/src/solution/s0055_jump_game.rs @@ -27,6 +27,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/jump-game/ +// discuss: https://leetcode.com/problems/jump-game/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0056_merge_intervals.rs b/src/solution/s0056_merge_intervals.rs index 37b7ade4..108c043b 100644 --- a/src/solution/s0056_merge_intervals.rs +++ b/src/solution/s0056_merge_intervals.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/merge-intervals/ +// discuss: https://leetcode.com/problems/merge-intervals/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Definition for an interval. diff --git a/src/solution/s0057_insert_interval.rs b/src/solution/s0057_insert_interval.rs index 90294a03..0afe62b4 100644 --- a/src/solution/s0057_insert_interval.rs +++ b/src/solution/s0057_insert_interval.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/insert-interval/ +// discuss: https://leetcode.com/problems/insert-interval/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Definition for an interval. diff --git a/src/solution/s0058_length_of_last_word.rs b/src/solution/s0058_length_of_last_word.rs index acd47197..4889c739 100644 --- a/src/solution/s0058_length_of_last_word.rs +++ b/src/solution/s0058_length_of_last_word.rs @@ -16,6 +16,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/length-of-last-word/ +// discuss: https://leetcode.com/problems/length-of-last-word/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0059_spiral_matrix_ii.rs b/src/solution/s0059_spiral_matrix_ii.rs index a9259672..d54f57b4 100644 --- a/src/solution/s0059_spiral_matrix_ii.rs +++ b/src/solution/s0059_spiral_matrix_ii.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/spiral-matrix-ii/ +// discuss: https://leetcode.com/problems/spiral-matrix-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0060_permutation_sequence.rs b/src/solution/s0060_permutation_sequence.rs index db0e84d5..0136a0b4 100644 --- a/src/solution/s0060_permutation_sequence.rs +++ b/src/solution/s0060_permutation_sequence.rs @@ -40,6 +40,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/permutation-sequence/ +// discuss: https://leetcode.com/problems/permutation-sequence/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // target: split k = i! + j! + ... diff --git a/src/solution/s0061_rotate_list.rs b/src/solution/s0061_rotate_list.rs index b7723576..bbfb059f 100644 --- a/src/solution/s0061_rotate_list.rs +++ b/src/solution/s0061_rotate_list.rs @@ -28,6 +28,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/rotate-list/ +// discuss: https://leetcode.com/problems/rotate-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0062_unique_paths.rs b/src/solution/s0062_unique_paths.rs index fd3586fe..3a158326 100644 --- a/src/solution/s0062_unique_paths.rs +++ b/src/solution/s0062_unique_paths.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/unique-paths/ +// discuss: https://leetcode.com/problems/unique-paths/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // its high school math: C(r,n) = n! / r!(n-r)! ...are you fxxking kidding me? diff --git a/src/solution/s0063_unique_paths_ii.rs b/src/solution/s0063_unique_paths_ii.rs index 84839e23..04d84911 100644 --- a/src/solution/s0063_unique_paths_ii.rs +++ b/src/solution/s0063_unique_paths_ii.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/unique-paths-ii/ +// discuss: https://leetcode.com/problems/unique-paths-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Bottom-Up DP diff --git a/src/solution/s0064_minimum_path_sum.rs b/src/solution/s0064_minimum_path_sum.rs index 6500e2a3..d6340d50 100644 --- a/src/solution/s0064_minimum_path_sum.rs +++ b/src/solution/s0064_minimum_path_sum.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/minimum-path-sum/ +// discuss: https://leetcode.com/problems/minimum-path-sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0065_valid_number.rs b/src/solution/s0065_valid_number.rs index 0370784c..11c5753d 100644 --- a/src/solution/s0065_valid_number.rs +++ b/src/solution/s0065_valid_number.rs @@ -36,6 +36,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/valid-number/ +// discuss: https://leetcode.com/problems/valid-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // hope that regex was included in std library... diff --git a/src/solution/s0066_plus_one.rs b/src/solution/s0066_plus_one.rs index ab0bda1a..fb1ea045 100644 --- a/src/solution/s0066_plus_one.rs +++ b/src/solution/s0066_plus_one.rs @@ -26,6 +26,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/plus-one/ +// discuss: https://leetcode.com/problems/plus-one/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0067_add_binary.rs b/src/solution/s0067_add_binary.rs index 715824f5..8c9951cc 100644 --- a/src/solution/s0067_add_binary.rs +++ b/src/solution/s0067_add_binary.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/add-binary/ +// discuss: https://leetcode.com/problems/add-binary/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::char::from_digit; diff --git a/src/solution/s0068_text_justification.rs b/src/solution/s0068_text_justification.rs index 2d8a4fd2..827fa4f8 100644 --- a/src/solution/s0068_text_justification.rs +++ b/src/solution/s0068_text_justification.rs @@ -69,6 +69,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/text-justification/ +// discuss: https://leetcode.com/problems/text-justification/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0069_sqrtx.rs b/src/solution/s0069_sqrtx.rs index 5c15c63b..256f88be 100644 --- a/src/solution/s0069_sqrtx.rs +++ b/src/solution/s0069_sqrtx.rs @@ -26,6 +26,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/sqrtx/ +// discuss: https://leetcode.com/problems/sqrtx/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Newton-Raphson for: root^2 - n = 0 diff --git a/src/solution/s0070_climbing_stairs.rs b/src/solution/s0070_climbing_stairs.rs index 4a9b44f0..2ef4153b 100644 --- a/src/solution/s0070_climbing_stairs.rs +++ b/src/solution/s0070_climbing_stairs.rs @@ -31,6 +31,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/climbing-stairs/ +// discuss: https://leetcode.com/problems/climbing-stairs/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Bottom-up DP diff --git a/src/solution/s0071_simplify_path.rs b/src/solution/s0071_simplify_path.rs index 6b6b909c..4b61f7be 100644 --- a/src/solution/s0071_simplify_path.rs +++ b/src/solution/s0071_simplify_path.rs @@ -57,6 +57,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/simplify-path/ +// discuss: https://leetcode.com/problems/simplify-path/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0072_edit_distance.rs b/src/solution/s0072_edit_distance.rs index 280518c6..d50d9fa3 100644 --- a/src/solution/s0072_edit_distance.rs +++ b/src/solution/s0072_edit_distance.rs @@ -38,6 +38,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/edit-distance/ +// discuss: https://leetcode.com/problems/edit-distance/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0073_set_matrix_zeroes.rs b/src/solution/s0073_set_matrix_zeroes.rs index cdc73324..8d8cdab8 100644 --- a/src/solution/s0073_set_matrix_zeroes.rs +++ b/src/solution/s0073_set_matrix_zeroes.rs @@ -48,6 +48,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/set-matrix-zeroes/ +// discuss: https://leetcode.com/problems/set-matrix-zeroes/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0074_search_a_2d_matrix.rs b/src/solution/s0074_search_a_2d_matrix.rs index d535f16e..90975918 100644 --- a/src/solution/s0074_search_a_2d_matrix.rs +++ b/src/solution/s0074_search_a_2d_matrix.rs @@ -36,6 +36,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/search-a-2d-matrix/ +// discuss: https://leetcode.com/problems/search-a-2d-matrix/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0075_sort_colors.rs b/src/solution/s0075_sort_colors.rs index 8276ea52..6b72ac88 100644 --- a/src/solution/s0075_sort_colors.rs +++ b/src/solution/s0075_sort_colors.rs @@ -24,6 +24,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/sort-colors/ +// discuss: https://leetcode.com/problems/sort-colors/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // three-way partition diff --git a/src/solution/s0076_minimum_window_substring.rs b/src/solution/s0076_minimum_window_substring.rs index 1eaa1ab9..9d190533 100644 --- a/src/solution/s0076_minimum_window_substring.rs +++ b/src/solution/s0076_minimum_window_substring.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/minimum-window-substring/ +// discuss: https://leetcode.com/problems/minimum-window-substring/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashMap; impl Solution { diff --git a/src/solution/s0077_combinations.rs b/src/solution/s0077_combinations.rs index c5e56f80..6bb10d6b 100644 --- a/src/solution/s0077_combinations.rs +++ b/src/solution/s0077_combinations.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/combinations/ +// discuss: https://leetcode.com/problems/combinations/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0078_subsets.rs b/src/solution/s0078_subsets.rs index 95757486..2db34925 100644 --- a/src/solution/s0078_subsets.rs +++ b/src/solution/s0078_subsets.rs @@ -24,6 +24,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/subsets/ +// discuss: https://leetcode.com/problems/subsets/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0079_word_search.rs b/src/solution/s0079_word_search.rs index fa02e3ad..07c4a705 100644 --- a/src/solution/s0079_word_search.rs +++ b/src/solution/s0079_word_search.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/word-search/ +// discuss: https://leetcode.com/problems/word-search/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO: use HashSet to record visited pos diff --git a/src/solution/s0080_remove_duplicates_from_sorted_array_ii.rs b/src/solution/s0080_remove_duplicates_from_sorted_array_ii.rs index 1ba2e2e9..70b3cf82 100644 --- a/src/solution/s0080_remove_duplicates_from_sorted_array_ii.rs +++ b/src/solution/s0080_remove_duplicates_from_sorted_array_ii.rs @@ -46,6 +46,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ +// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0081_search_in_rotated_sorted_array_ii.rs b/src/solution/s0081_search_in_rotated_sorted_array_ii.rs index d7f841d7..7972a16f 100644 --- a/src/solution/s0081_search_in_rotated_sorted_array_ii.rs +++ b/src/solution/s0081_search_in_rotated_sorted_array_ii.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ +// discuss: https://leetcode.com/problems/search-in-rotated-sorted-array-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs b/src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs index d04b15f8..067d0c79 100644 --- a/src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs +++ b/src/solution/s0082_remove_duplicates_from_sorted_list_ii.rs @@ -21,6 +21,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ +// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Definition for singly-linked list. diff --git a/src/solution/s0083_remove_duplicates_from_sorted_list.rs b/src/solution/s0083_remove_duplicates_from_sorted_list.rs index 785cc03f..5c9552cc 100644 --- a/src/solution/s0083_remove_duplicates_from_sorted_list.rs +++ b/src/solution/s0083_remove_duplicates_from_sorted_list.rs @@ -21,6 +21,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-list/ +// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Definition for singly-linked list. diff --git a/src/solution/s0084_largest_rectangle_in_histogram.rs b/src/solution/s0084_largest_rectangle_in_histogram.rs index 19b845a0..d33b9bda 100644 --- a/src/solution/s0084_largest_rectangle_in_histogram.rs +++ b/src/solution/s0084_largest_rectangle_in_histogram.rs @@ -25,6 +25,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/largest-rectangle-in-histogram/ +// discuss: https://leetcode.com/problems/largest-rectangle-in-histogram/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // record the height and start position using 2 stack, thus we reuse the previously scanned information diff --git a/src/solution/s0085_maximal_rectangle.rs b/src/solution/s0085_maximal_rectangle.rs index 878236ef..6dbf2951 100644 --- a/src/solution/s0085_maximal_rectangle.rs +++ b/src/solution/s0085_maximal_rectangle.rs @@ -19,6 +19,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/maximal-rectangle/ +// discuss: https://leetcode.com/problems/maximal-rectangle/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0086_partition_list.rs b/src/solution/s0086_partition_list.rs index d30a9053..1f4952dd 100644 --- a/src/solution/s0086_partition_list.rs +++ b/src/solution/s0086_partition_list.rs @@ -16,6 +16,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/partition-list/ +// discuss: https://leetcode.com/problems/partition-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0087_scramble_string.rs b/src/solution/s0087_scramble_string.rs index 5b70a69a..19b47dc0 100644 --- a/src/solution/s0087_scramble_string.rs +++ b/src/solution/s0087_scramble_string.rs @@ -63,6 +63,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/scramble-string/ +// discuss: https://leetcode.com/problems/scramble-string/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0088_merge_sorted_array.rs b/src/solution/s0088_merge_sorted_array.rs index 955d5ad9..bdcc2a1a 100644 --- a/src/solution/s0088_merge_sorted_array.rs +++ b/src/solution/s0088_merge_sorted_array.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/merge-sorted-array/ +// discuss: https://leetcode.com/problems/merge-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0089_gray_code.rs b/src/solution/s0089_gray_code.rs index 0bc4ffc0..039283eb 100644 --- a/src/solution/s0089_gray_code.rs +++ b/src/solution/s0089_gray_code.rs @@ -38,6 +38,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/gray-code/ +// discuss: https://leetcode.com/problems/gray-code/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0090_subsets_ii.rs b/src/solution/s0090_subsets_ii.rs index 80d17be6..e859e2d1 100644 --- a/src/solution/s0090_subsets_ii.rs +++ b/src/solution/s0090_subsets_ii.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/subsets-ii/ +// discuss: https://leetcode.com/problems/subsets-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0091_decode_ways.rs b/src/solution/s0091_decode_ways.rs index a181c137..bbecc932 100644 --- a/src/solution/s0091_decode_ways.rs +++ b/src/solution/s0091_decode_ways.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/decode-ways/ +// discuss: https://leetcode.com/problems/decode-ways/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0092_reverse_linked_list_ii.rs b/src/solution/s0092_reverse_linked_list_ii.rs index e84035da..318c0d15 100644 --- a/src/solution/s0092_reverse_linked_list_ii.rs +++ b/src/solution/s0092_reverse_linked_list_ii.rs @@ -16,6 +16,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/reverse-linked-list-ii/ +// discuss: https://leetcode.com/problems/reverse-linked-list-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Definition for singly-linked list. diff --git a/src/solution/s0093_restore_ip_addresses.rs b/src/solution/s0093_restore_ip_addresses.rs index 08d0a8ec..5c2706b4 100644 --- a/src/solution/s0093_restore_ip_addresses.rs +++ b/src/solution/s0093_restore_ip_addresses.rs @@ -13,6 +13,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/restore-ip-addresses/ +// discuss: https://leetcode.com/problems/restore-ip-addresses/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0094_binary_tree_inorder_traversal.rs b/src/solution/s0094_binary_tree_inorder_traversal.rs index d4d2ea2a..01afb57a 100644 --- a/src/solution/s0094_binary_tree_inorder_traversal.rs +++ b/src/solution/s0094_binary_tree_inorder_traversal.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/binary-tree-inorder-traversal/ +// discuss: https://leetcode.com/problems/binary-tree-inorder-traversal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use crate::util::tree::{to_tree, TreeNode}; diff --git a/src/solution/s0095_unique_binary_search_trees_ii.rs b/src/solution/s0095_unique_binary_search_trees_ii.rs index ffdc763b..1f75639d 100644 --- a/src/solution/s0095_unique_binary_search_trees_ii.rs +++ b/src/solution/s0095_unique_binary_search_trees_ii.rs @@ -27,6 +27,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/unique-binary-search-trees-ii/ +// discuss: https://leetcode.com/problems/unique-binary-search-trees-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0096_unique_binary_search_trees.rs b/src/solution/s0096_unique_binary_search_trees.rs index 7124a2bf..4f64c26c 100644 --- a/src/solution/s0096_unique_binary_search_trees.rs +++ b/src/solution/s0096_unique_binary_search_trees.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/unique-binary-search-trees/ +// discuss: https://leetcode.com/problems/unique-binary-search-trees/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0097_interleaving_string.rs b/src/solution/s0097_interleaving_string.rs index 5741bb7c..8d69d851 100644 --- a/src/solution/s0097_interleaving_string.rs +++ b/src/solution/s0097_interleaving_string.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/interleaving-string/ +// discuss: https://leetcode.com/problems/interleaving-string/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // DFS with memorization diff --git a/src/solution/s0098_validate_binary_search_tree.rs b/src/solution/s0098_validate_binary_search_tree.rs index 7f55a47e..09098c18 100644 --- a/src/solution/s0098_validate_binary_search_tree.rs +++ b/src/solution/s0098_validate_binary_search_tree.rs @@ -37,6 +37,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/validate-binary-search-tree/ +// discuss: https://leetcode.com/problems/validate-binary-search-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Definition for a binary tree node. diff --git a/src/solution/s0099_recover_binary_search_tree.rs b/src/solution/s0099_recover_binary_search_tree.rs index 3b92da04..2401231a 100644 --- a/src/solution/s0099_recover_binary_search_tree.rs +++ b/src/solution/s0099_recover_binary_search_tree.rs @@ -57,6 +57,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/recover-binary-search-tree/ +// discuss: https://leetcode.com/problems/recover-binary-search-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0100_same_tree.rs b/src/solution/s0100_same_tree.rs index f1ca1972..c7dc1372 100644 --- a/src/solution/s0100_same_tree.rs +++ b/src/solution/s0100_same_tree.rs @@ -45,6 +45,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/same-tree/ +// discuss: https://leetcode.com/problems/same-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; use std::rc::Rc; diff --git a/src/solution/s0101_symmetric_tree.rs b/src/solution/s0101_symmetric_tree.rs index c62962d2..41f44bc8 100644 --- a/src/solution/s0101_symmetric_tree.rs +++ b/src/solution/s0101_symmetric_tree.rs @@ -32,6 +32,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/symmetric-tree/ +// discuss: https://leetcode.com/problems/symmetric-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0102_binary_tree_level_order_traversal.rs b/src/solution/s0102_binary_tree_level_order_traversal.rs index 42f782a5..a5a3fd13 100644 --- a/src/solution/s0102_binary_tree_level_order_traversal.rs +++ b/src/solution/s0102_binary_tree_level_order_traversal.rs @@ -28,6 +28,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-level-order-traversal/ +// discuss: https://leetcode.com/problems/binary-tree-level-order-traversal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs b/src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs index 96476fda..78aa7b5e 100644 --- a/src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs +++ b/src/solution/s0103_binary_tree_zigzag_level_order_traversal.rs @@ -28,6 +28,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ +// discuss: https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0104_maximum_depth_of_binary_tree.rs b/src/solution/s0104_maximum_depth_of_binary_tree.rs index 6d2f18e6..2b2a51d4 100644 --- a/src/solution/s0104_maximum_depth_of_binary_tree.rs +++ b/src/solution/s0104_maximum_depth_of_binary_tree.rs @@ -24,6 +24,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/maximum-depth-of-binary-tree/ +// discuss: https://leetcode.com/problems/maximum-depth-of-binary-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs b/src/solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs index e271faa5..809ae654 100644 --- a/src/solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs +++ b/src/solution/s0105_construct_binary_tree_from_preorder_and_inorder_traversal.rs @@ -25,6 +25,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ +// discuss: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs b/src/solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs index 63c469be..df215bbc 100644 --- a/src/solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs +++ b/src/solution/s0106_construct_binary_tree_from_inorder_and_postorder_traversal.rs @@ -26,6 +26,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/ +// discuss: https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0107_binary_tree_level_order_traversal_ii.rs b/src/solution/s0107_binary_tree_level_order_traversal_ii.rs index f77229a6..4b74e0d7 100644 --- a/src/solution/s0107_binary_tree_level_order_traversal_ii.rs +++ b/src/solution/s0107_binary_tree_level_order_traversal_ii.rs @@ -28,6 +28,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ +// discuss: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0108_convert_sorted_array_to_binary_search_tree.rs b/src/solution/s0108_convert_sorted_array_to_binary_search_tree.rs index 67e4b2ac..2cefab5c 100644 --- a/src/solution/s0108_convert_sorted_array_to_binary_search_tree.rs +++ b/src/solution/s0108_convert_sorted_array_to_binary_search_tree.rs @@ -23,6 +23,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ +// discuss: https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0109_convert_sorted_list_to_binary_search_tree.rs b/src/solution/s0109_convert_sorted_list_to_binary_search_tree.rs index 6bb37b0e..e2070965 100644 --- a/src/solution/s0109_convert_sorted_list_to_binary_search_tree.rs +++ b/src/solution/s0109_convert_sorted_list_to_binary_search_tree.rs @@ -24,6 +24,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/ +// discuss: https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0110_balanced_binary_tree.rs b/src/solution/s0110_balanced_binary_tree.rs index bb067d02..c3171126 100644 --- a/src/solution/s0110_balanced_binary_tree.rs +++ b/src/solution/s0110_balanced_binary_tree.rs @@ -42,6 +42,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/balanced-binary-tree/ +// discuss: https://leetcode.com/problems/balanced-binary-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0111_minimum_depth_of_binary_tree.rs b/src/solution/s0111_minimum_depth_of_binary_tree.rs index 1efb759d..a73e49f0 100644 --- a/src/solution/s0111_minimum_depth_of_binary_tree.rs +++ b/src/solution/s0111_minimum_depth_of_binary_tree.rs @@ -24,6 +24,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/minimum-depth-of-binary-tree/ +// discuss: https://leetcode.com/problems/minimum-depth-of-binary-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0112_path_sum.rs b/src/solution/s0112_path_sum.rs index 2f036b21..e2e0a235 100644 --- a/src/solution/s0112_path_sum.rs +++ b/src/solution/s0112_path_sum.rs @@ -25,6 +25,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/path-sum/ +// discuss: https://leetcode.com/problems/path-sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0113_path_sum_ii.rs b/src/solution/s0113_path_sum_ii.rs index d567e693..106d1921 100644 --- a/src/solution/s0113_path_sum_ii.rs +++ b/src/solution/s0113_path_sum_ii.rs @@ -32,6 +32,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/path-sum-ii/ +// discuss: https://leetcode.com/problems/path-sum-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0114_flatten_binary_tree_to_linked_list.rs b/src/solution/s0114_flatten_binary_tree_to_linked_list.rs index 9661e9e7..63668c47 100644 --- a/src/solution/s0114_flatten_binary_tree_to_linked_list.rs +++ b/src/solution/s0114_flatten_binary_tree_to_linked_list.rs @@ -33,6 +33,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/flatten-binary-tree-to-linked-list/ +// discuss: https://leetcode.com/problems/flatten-binary-tree-to-linked-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0115_distinct_subsequences.rs b/src/solution/s0115_distinct_subsequences.rs index f67304f6..7af3d08b 100644 --- a/src/solution/s0115_distinct_subsequences.rs +++ b/src/solution/s0115_distinct_subsequences.rs @@ -48,6 +48,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/distinct-subsequences/ +// discuss: https://leetcode.com/problems/distinct-subsequences/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0118_pascals_triangle.rs b/src/solution/s0118_pascals_triangle.rs index a69d64e4..d593242d 100644 --- a/src/solution/s0118_pascals_triangle.rs +++ b/src/solution/s0118_pascals_triangle.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/pascals-triangle/ +// discuss: https://leetcode.com/problems/pascals-triangle/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0119_pascals_triangle_ii.rs b/src/solution/s0119_pascals_triangle_ii.rs index 5129ed5a..588a9835 100644 --- a/src/solution/s0119_pascals_triangle_ii.rs +++ b/src/solution/s0119_pascals_triangle_ii.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/pascals-triangle-ii/ +// discuss: https://leetcode.com/problems/pascals-triangle-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0120_triangle.rs b/src/solution/s0120_triangle.rs index 4a96591a..93c38d33 100644 --- a/src/solution/s0120_triangle.rs +++ b/src/solution/s0120_triangle.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/triangle/ +// discuss: https://leetcode.com/problems/triangle/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0121_best_time_to_buy_and_sell_stock.rs b/src/solution/s0121_best_time_to_buy_and_sell_stock.rs index fa27fc10..d5d3746d 100644 --- a/src/solution/s0121_best_time_to_buy_and_sell_stock.rs +++ b/src/solution/s0121_best_time_to_buy_and_sell_stock.rs @@ -27,6 +27,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ +// discuss: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0122_best_time_to_buy_and_sell_stock_ii.rs b/src/solution/s0122_best_time_to_buy_and_sell_stock_ii.rs index 7b376e6b..803c71b6 100644 --- a/src/solution/s0122_best_time_to_buy_and_sell_stock_ii.rs +++ b/src/solution/s0122_best_time_to_buy_and_sell_stock_ii.rs @@ -36,6 +36,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ +// discuss: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0123_best_time_to_buy_and_sell_stock_iii.rs b/src/solution/s0123_best_time_to_buy_and_sell_stock_iii.rs index 3907c044..bb068273 100644 --- a/src/solution/s0123_best_time_to_buy_and_sell_stock_iii.rs +++ b/src/solution/s0123_best_time_to_buy_and_sell_stock_iii.rs @@ -35,6 +35,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/ +// discuss: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0124_binary_tree_maximum_path_sum.rs b/src/solution/s0124_binary_tree_maximum_path_sum.rs index f76f3178..e7c57b49 100644 --- a/src/solution/s0124_binary_tree_maximum_path_sum.rs +++ b/src/solution/s0124_binary_tree_maximum_path_sum.rs @@ -35,6 +35,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-maximum-path-sum/ +// discuss: https://leetcode.com/problems/binary-tree-maximum-path-sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0125_valid_palindrome.rs b/src/solution/s0125_valid_palindrome.rs index b325ac0c..2f090b72 100644 --- a/src/solution/s0125_valid_palindrome.rs +++ b/src/solution/s0125_valid_palindrome.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/valid-palindrome/ +// discuss: https://leetcode.com/problems/valid-palindrome/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0126_word_ladder_ii.rs b/src/solution/s0126_word_ladder_ii.rs index b9de6f4c..32169865 100644 --- a/src/solution/s0126_word_ladder_ii.rs +++ b/src/solution/s0126_word_ladder_ii.rs @@ -52,6 +52,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/word-ladder-ii/ +// discuss: https://leetcode.com/problems/word-ladder-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0127_word_ladder.rs b/src/solution/s0127_word_ladder.rs index 6c8fbfa6..a67465fa 100644 --- a/src/solution/s0127_word_ladder.rs +++ b/src/solution/s0127_word_ladder.rs @@ -47,6 +47,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/word-ladder/ +// discuss: https://leetcode.com/problems/word-ladder/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashSet; diff --git a/src/solution/s0128_longest_consecutive_sequence.rs b/src/solution/s0128_longest_consecutive_sequence.rs index ef77362b..f0e0806f 100644 --- a/src/solution/s0128_longest_consecutive_sequence.rs +++ b/src/solution/s0128_longest_consecutive_sequence.rs @@ -16,6 +16,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/longest-consecutive-sequence/ +// discuss: https://leetcode.com/problems/longest-consecutive-sequence/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0129_sum_root_to_leaf_numbers.rs b/src/solution/s0129_sum_root_to_leaf_numbers.rs index c52dc94c..1e44fb68 100644 --- a/src/solution/s0129_sum_root_to_leaf_numbers.rs +++ b/src/solution/s0129_sum_root_to_leaf_numbers.rs @@ -42,6 +42,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/sum-root-to-leaf-numbers/ +// discuss: https://leetcode.com/problems/sum-root-to-leaf-numbers/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0130_surrounded_regions.rs b/src/solution/s0130_surrounded_regions.rs index 90135ae8..411286b4 100644 --- a/src/solution/s0130_surrounded_regions.rs +++ b/src/solution/s0130_surrounded_regions.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/surrounded-regions/ +// discuss: https://leetcode.com/problems/surrounded-regions/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0131_palindrome_partitioning.rs b/src/solution/s0131_palindrome_partitioning.rs index a9f52608..22a92dfd 100644 --- a/src/solution/s0131_palindrome_partitioning.rs +++ b/src/solution/s0131_palindrome_partitioning.rs @@ -19,6 +19,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/palindrome-partitioning/ +// discuss: https://leetcode.com/problems/palindrome-partitioning/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0132_palindrome_partitioning_ii.rs b/src/solution/s0132_palindrome_partitioning_ii.rs index 99dc13f0..81b75cf6 100644 --- a/src/solution/s0132_palindrome_partitioning_ii.rs +++ b/src/solution/s0132_palindrome_partitioning_ii.rs @@ -16,6 +16,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/palindrome-partitioning-ii/ +// discuss: https://leetcode.com/problems/palindrome-partitioning-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0134_gas_station.rs b/src/solution/s0134_gas_station.rs index 69462797..352990f9 100644 --- a/src/solution/s0134_gas_station.rs +++ b/src/solution/s0134_gas_station.rs @@ -55,6 +55,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/gas-station/ +// discuss: https://leetcode.com/problems/gas-station/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0135_candy.rs b/src/solution/s0135_candy.rs index 39e3de36..debb29d0 100644 --- a/src/solution/s0135_candy.rs +++ b/src/solution/s0135_candy.rs @@ -32,6 +32,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/candy/ +// discuss: https://leetcode.com/problems/candy/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0136_single_number.rs b/src/solution/s0136_single_number.rs index 5d14631b..580d1213 100644 --- a/src/solution/s0136_single_number.rs +++ b/src/solution/s0136_single_number.rs @@ -24,6 +24,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/single-number/ +// discuss: https://leetcode.com/problems/single-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { pub fn single_number(nums: Vec) -> i32 { diff --git a/src/solution/s0137_single_number_ii.rs b/src/solution/s0137_single_number_ii.rs index e4a928a2..5e99cd84 100644 --- a/src/solution/s0137_single_number_ii.rs +++ b/src/solution/s0137_single_number_ii.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/single-number-ii/ +// discuss: https://leetcode.com/problems/single-number-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0139_word_break.rs b/src/solution/s0139_word_break.rs index ed4af30c..ce9e2684 100644 --- a/src/solution/s0139_word_break.rs +++ b/src/solution/s0139_word_break.rs @@ -48,6 +48,9 @@ DP 向上递推即可 BFS 也是可以的 */ +// problem: https://leetcode.com/problems/word-break/ +// discuss: https://leetcode.com/problems/word-break/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashSet; diff --git a/src/solution/s0140_word_break_ii.rs b/src/solution/s0140_word_break_ii.rs index 9953e574..68c1319e 100644 --- a/src/solution/s0140_word_break_ii.rs +++ b/src/solution/s0140_word_break_ii.rs @@ -50,6 +50,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/word-break-ii/ +// discuss: https://leetcode.com/problems/word-break-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0143_reorder_list.rs b/src/solution/s0143_reorder_list.rs index 06ec32af..1a7854cc 100644 --- a/src/solution/s0143_reorder_list.rs +++ b/src/solution/s0143_reorder_list.rs @@ -21,6 +21,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/reorder-list/ +// discuss: https://leetcode.com/problems/reorder-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0144_binary_tree_preorder_traversal.rs b/src/solution/s0144_binary_tree_preorder_traversal.rs index 02ed1f7a..3d823976 100644 --- a/src/solution/s0144_binary_tree_preorder_traversal.rs +++ b/src/solution/s0144_binary_tree_preorder_traversal.rs @@ -22,6 +22,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-preorder-traversal/ +// discuss: https://leetcode.com/problems/binary-tree-preorder-traversal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0145_binary_tree_postorder_traversal.rs b/src/solution/s0145_binary_tree_postorder_traversal.rs index 2670b5bd..63197e88 100644 --- a/src/solution/s0145_binary_tree_postorder_traversal.rs +++ b/src/solution/s0145_binary_tree_postorder_traversal.rs @@ -22,6 +22,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-postorder-traversal/ +// discuss: https://leetcode.com/problems/binary-tree-postorder-traversal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0146_lru_cache.rs b/src/solution/s0146_lru_cache.rs index 5ee256c8..226cbf77 100644 --- a/src/solution/s0146_lru_cache.rs +++ b/src/solution/s0146_lru_cache.rs @@ -29,6 +29,9 @@ * * */ +// problem: https://leetcode.com/problems/lru-cache/ +// discuss: https://leetcode.com/problems/lru-cache/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0147_insertion_sort_list.rs b/src/solution/s0147_insertion_sort_list.rs index cdcd2d69..09aff82b 100644 --- a/src/solution/s0147_insertion_sort_list.rs +++ b/src/solution/s0147_insertion_sort_list.rs @@ -41,6 +41,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/insertion-sort-list/ +// discuss: https://leetcode.com/problems/insertion-sort-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO; boring diff --git a/src/solution/s0148_sort_list.rs b/src/solution/s0148_sort_list.rs index 4bc8ac17..78b7f08c 100644 --- a/src/solution/s0148_sort_list.rs +++ b/src/solution/s0148_sort_list.rs @@ -20,6 +20,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/sort-list/ +// discuss: https://leetcode.com/problems/sort-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0149_max_points_on_a_line.rs b/src/solution/s0149_max_points_on_a_line.rs index 1b0bf16c..31ea4c62 100644 --- a/src/solution/s0149_max_points_on_a_line.rs +++ b/src/solution/s0149_max_points_on_a_line.rs @@ -38,6 +38,9 @@ pub struct Solution {} use crate::util::point::Point; +// problem: https://leetcode.com/problems/max-points-on-a-line/ +// discuss: https://leetcode.com/problems/max-points-on-a-line/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0150_evaluate_reverse_polish_notation.rs b/src/solution/s0150_evaluate_reverse_polish_notation.rs index 4626d5aa..048824dd 100644 --- a/src/solution/s0150_evaluate_reverse_polish_notation.rs +++ b/src/solution/s0150_evaluate_reverse_polish_notation.rs @@ -46,6 +46,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/evaluate-reverse-polish-notation/ +// discuss: https://leetcode.com/problems/evaluate-reverse-polish-notation/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0151_reverse_words_in_a_string.rs b/src/solution/s0151_reverse_words_in_a_string.rs index e26bd573..627f0dd6 100644 --- a/src/solution/s0151_reverse_words_in_a_string.rs +++ b/src/solution/s0151_reverse_words_in_a_string.rs @@ -46,6 +46,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/reverse-words-in-a-string/ +// discuss: https://leetcode.com/problems/reverse-words-in-a-string/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0152_maximum_product_subarray.rs b/src/solution/s0152_maximum_product_subarray.rs index 34bba87e..b85b5ecb 100644 --- a/src/solution/s0152_maximum_product_subarray.rs +++ b/src/solution/s0152_maximum_product_subarray.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/maximum-product-subarray/ +// discuss: https://leetcode.com/problems/maximum-product-subarray/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0153_find_minimum_in_rotated_sorted_array.rs b/src/solution/s0153_find_minimum_in_rotated_sorted_array.rs index 9c609f42..03b7e7f1 100644 --- a/src/solution/s0153_find_minimum_in_rotated_sorted_array.rs +++ b/src/solution/s0153_find_minimum_in_rotated_sorted_array.rs @@ -26,6 +26,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/ +// discuss: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs b/src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs index 8868ff82..cdb23ac3 100644 --- a/src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs +++ b/src/solution/s0154_find_minimum_in_rotated_sorted_array_ii.rs @@ -31,6 +31,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/ +// discuss: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0155_min_stack.rs b/src/solution/s0155_min_stack.rs index 1c544d87..99a96698 100644 --- a/src/solution/s0155_min_stack.rs +++ b/src/solution/s0155_min_stack.rs @@ -34,6 +34,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/min-stack/ +// discuss: https://leetcode.com/problems/min-stack/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0162_find_peak_element.rs b/src/solution/s0162_find_peak_element.rs index 8e5a3f76..3888b998 100644 --- a/src/solution/s0162_find_peak_element.rs +++ b/src/solution/s0162_find_peak_element.rs @@ -32,6 +32,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/find-peak-element/ +// discuss: https://leetcode.com/problems/find-peak-element/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0164_maximum_gap.rs b/src/solution/s0164_maximum_gap.rs index ded5006d..bd961db7 100644 --- a/src/solution/s0164_maximum_gap.rs +++ b/src/solution/s0164_maximum_gap.rs @@ -30,6 +30,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/maximum-gap/ +// discuss: https://leetcode.com/problems/maximum-gap/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* 想不出来, 一看解析居然是 Radix Sort 或 Bucket Sort, 我就 ??? 了... diff --git a/src/solution/s0165_compare_version_numbers.rs b/src/solution/s0165_compare_version_numbers.rs index 522224df..b53f1bbb 100644 --- a/src/solution/s0165_compare_version_numbers.rs +++ b/src/solution/s0165_compare_version_numbers.rs @@ -48,6 +48,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/compare-version-numbers/ +// discuss: https://leetcode.com/problems/compare-version-numbers/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0166_fraction_to_recurring_decimal.rs b/src/solution/s0166_fraction_to_recurring_decimal.rs index 29900b38..4585738f 100644 --- a/src/solution/s0166_fraction_to_recurring_decimal.rs +++ b/src/solution/s0166_fraction_to_recurring_decimal.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/fraction-to-recurring-decimal/ +// discuss: https://leetcode.com/problems/fraction-to-recurring-decimal/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO diff --git a/src/solution/s0167_two_sum_ii_input_array_is_sorted.rs b/src/solution/s0167_two_sum_ii_input_array_is_sorted.rs index 9fd7a483..58de2e86 100644 --- a/src/solution/s0167_two_sum_ii_input_array_is_sorted.rs +++ b/src/solution/s0167_two_sum_ii_input_array_is_sorted.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ +// discuss: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0168_excel_sheet_column_title.rs b/src/solution/s0168_excel_sheet_column_title.rs index c61f9875..5a9dc585 100644 --- a/src/solution/s0168_excel_sheet_column_title.rs +++ b/src/solution/s0168_excel_sheet_column_title.rs @@ -39,6 +39,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/excel-sheet-column-title/ +// discuss: https://leetcode.com/problems/excel-sheet-column-title/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0169_majority_element.rs b/src/solution/s0169_majority_element.rs index ccde478f..be59bea6 100644 --- a/src/solution/s0169_majority_element.rs +++ b/src/solution/s0169_majority_element.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/majority-element/ +// discuss: https://leetcode.com/problems/majority-element/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0171_excel_sheet_column_number.rs b/src/solution/s0171_excel_sheet_column_number.rs index a6e6838c..1b2f611f 100644 --- a/src/solution/s0171_excel_sheet_column_number.rs +++ b/src/solution/s0171_excel_sheet_column_number.rs @@ -39,6 +39,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/excel-sheet-column-number/ +// discuss: https://leetcode.com/problems/excel-sheet-column-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO: boring diff --git a/src/solution/s0172_factorial_trailing_zeroes.rs b/src/solution/s0172_factorial_trailing_zeroes.rs index 0c9f9691..9a54916d 100644 --- a/src/solution/s0172_factorial_trailing_zeroes.rs +++ b/src/solution/s0172_factorial_trailing_zeroes.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/factorial-trailing-zeroes/ +// discuss: https://leetcode.com/problems/factorial-trailing-zeroes/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0173_binary_search_tree_iterator.rs b/src/solution/s0173_binary_search_tree_iterator.rs index caef4724..b350600d 100644 --- a/src/solution/s0173_binary_search_tree_iterator.rs +++ b/src/solution/s0173_binary_search_tree_iterator.rs @@ -42,6 +42,9 @@ use crate::util::tree::{to_tree, TreeNode}; use std::cell::RefCell; use std::rc::Rc; +// problem: https://leetcode.com/problems/binary-search-tree-iterator/ +// discuss: https://leetcode.com/problems/binary-search-tree-iterator/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0174_dungeon_game.rs b/src/solution/s0174_dungeon_game.rs index c1551250..23be4d97 100644 --- a/src/solution/s0174_dungeon_game.rs +++ b/src/solution/s0174_dungeon_game.rs @@ -57,6 +57,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/dungeon-game/ +// discuss: https://leetcode.com/problems/dungeon-game/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0179_largest_number.rs b/src/solution/s0179_largest_number.rs index 349ffc8b..65348165 100644 --- a/src/solution/s0179_largest_number.rs +++ b/src/solution/s0179_largest_number.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/largest-number/ +// discuss: https://leetcode.com/problems/largest-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0187_repeated_dna_sequences.rs b/src/solution/s0187_repeated_dna_sequences.rs index d16cf948..9ceb86cb 100644 --- a/src/solution/s0187_repeated_dna_sequences.rs +++ b/src/solution/s0187_repeated_dna_sequences.rs @@ -16,6 +16,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/repeated-dna-sequences/ +// discuss: https://leetcode.com/problems/repeated-dna-sequences/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0188_best_time_to_buy_and_sell_stock_iv.rs b/src/solution/s0188_best_time_to_buy_and_sell_stock_iv.rs index af1d9c09..e9c23319 100644 --- a/src/solution/s0188_best_time_to_buy_and_sell_stock_iv.rs +++ b/src/solution/s0188_best_time_to_buy_and_sell_stock_iv.rs @@ -27,6 +27,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/ +// discuss: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0189_rotate_array.rs b/src/solution/s0189_rotate_array.rs index 644ce374..1a4d2ab8 100644 --- a/src/solution/s0189_rotate_array.rs +++ b/src/solution/s0189_rotate_array.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/rotate-array/ +// discuss: https://leetcode.com/problems/rotate-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0198_house_robber.rs b/src/solution/s0198_house_robber.rs index e1257f0c..446e63f1 100644 --- a/src/solution/s0198_house_robber.rs +++ b/src/solution/s0198_house_robber.rs @@ -25,6 +25,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/house-robber/ +// discuss: https://leetcode.com/problems/house-robber/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0199_binary_tree_right_side_view.rs b/src/solution/s0199_binary_tree_right_side_view.rs index c580970c..e07dc998 100644 --- a/src/solution/s0199_binary_tree_right_side_view.rs +++ b/src/solution/s0199_binary_tree_right_side_view.rs @@ -20,6 +20,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-right-side-view/ +// discuss: https://leetcode.com/problems/binary-tree-right-side-view/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0200_number_of_islands.rs b/src/solution/s0200_number_of_islands.rs index b9bcadd2..262f0315 100644 --- a/src/solution/s0200_number_of_islands.rs +++ b/src/solution/s0200_number_of_islands.rs @@ -29,6 +29,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/number-of-islands/ +// discuss: https://leetcode.com/problems/number-of-islands/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Union-Find Set diff --git a/src/solution/s0201_bitwise_and_of_numbers_range.rs b/src/solution/s0201_bitwise_and_of_numbers_range.rs index 6fc338b7..6c46e74f 100644 --- a/src/solution/s0201_bitwise_and_of_numbers_range.rs +++ b/src/solution/s0201_bitwise_and_of_numbers_range.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/bitwise-and-of-numbers-range/ +// discuss: https://leetcode.com/problems/bitwise-and-of-numbers-range/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // just find the highest bit 1 of m and n diff --git a/src/solution/s0202_happy_number.rs b/src/solution/s0202_happy_number.rs index 3443f1db..076f2736 100644 --- a/src/solution/s0202_happy_number.rs +++ b/src/solution/s0202_happy_number.rs @@ -19,6 +19,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/happy-number/ +// discuss: https://leetcode.com/problems/happy-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashSet; diff --git a/src/solution/s0203_remove_linked_list_elements.rs b/src/solution/s0203_remove_linked_list_elements.rs index f8d9bc43..3e48d811 100644 --- a/src/solution/s0203_remove_linked_list_elements.rs +++ b/src/solution/s0203_remove_linked_list_elements.rs @@ -14,6 +14,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/remove-linked-list-elements/ +// discuss: https://leetcode.com/problems/remove-linked-list-elements/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0204_count_primes.rs b/src/solution/s0204_count_primes.rs index 4ec5d5c3..d6f0f134 100644 --- a/src/solution/s0204_count_primes.rs +++ b/src/solution/s0204_count_primes.rs @@ -14,6 +14,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/count-primes/ +// discuss: https://leetcode.com/problems/count-primes/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0205_isomorphic_strings.rs b/src/solution/s0205_isomorphic_strings.rs index 6bb77373..df697ebb 100644 --- a/src/solution/s0205_isomorphic_strings.rs +++ b/src/solution/s0205_isomorphic_strings.rs @@ -32,6 +32,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/isomorphic-strings/ +// discuss: https://leetcode.com/problems/isomorphic-strings/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::char; diff --git a/src/solution/s0206_reverse_linked_list.rs b/src/solution/s0206_reverse_linked_list.rs index 4689f415..b62aced8 100644 --- a/src/solution/s0206_reverse_linked_list.rs +++ b/src/solution/s0206_reverse_linked_list.rs @@ -18,6 +18,9 @@ pub struct Solution {} use crate::util::linked_list::{to_list, ListNode}; +// problem: https://leetcode.com/problems/reverse-linked-list/ +// discuss: https://leetcode.com/problems/reverse-linked-list/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0207_course_schedule.rs b/src/solution/s0207_course_schedule.rs index 2222adad..2a793683 100644 --- a/src/solution/s0207_course_schedule.rs +++ b/src/solution/s0207_course_schedule.rs @@ -35,6 +35,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/course-schedule/ +// discuss: https://leetcode.com/problems/course-schedule/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // topology sort, BFS diff --git a/src/solution/s0208_implement_trie_prefix_tree.rs b/src/solution/s0208_implement_trie_prefix_tree.rs index be29d61b..9ac8e470 100644 --- a/src/solution/s0208_implement_trie_prefix_tree.rs +++ b/src/solution/s0208_implement_trie_prefix_tree.rs @@ -26,6 +26,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/implement-trie-prefix-tree/ +// discuss: https://leetcode.com/problems/implement-trie-prefix-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here #[derive(Default)] diff --git a/src/solution/s0209_minimum_size_subarray_sum.rs b/src/solution/s0209_minimum_size_subarray_sum.rs index 13b02448..b6a692d7 100644 --- a/src/solution/s0209_minimum_size_subarray_sum.rs +++ b/src/solution/s0209_minimum_size_subarray_sum.rs @@ -17,6 +17,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/minimum-size-subarray-sum/ +// discuss: https://leetcode.com/problems/minimum-size-subarray-sum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0210_course_schedule_ii.rs b/src/solution/s0210_course_schedule_ii.rs index 336fe345..dd3a1b03 100644 --- a/src/solution/s0210_course_schedule_ii.rs +++ b/src/solution/s0210_course_schedule_ii.rs @@ -36,6 +36,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/course-schedule-ii/ +// discuss: https://leetcode.com/problems/course-schedule-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::VecDeque; diff --git a/src/solution/s0211_add_and_search_word_data_structure_design.rs b/src/solution/s0211_add_and_search_word_data_structure_design.rs index fbab7949..0652f951 100644 --- a/src/solution/s0211_add_and_search_word_data_structure_design.rs +++ b/src/solution/s0211_add_and_search_word_data_structure_design.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/add-and-search-word-data-structure-design/ +// discuss: https://leetcode.com/problems/add-and-search-word-data-structure-design/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here struct WordDictionary { diff --git a/src/solution/s0212_word_search_ii.rs b/src/solution/s0212_word_search_ii.rs index 77914f04..ada034c8 100644 --- a/src/solution/s0212_word_search_ii.rs +++ b/src/solution/s0212_word_search_ii.rs @@ -34,6 +34,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/word-search-ii/ +// discuss: https://leetcode.com/problems/word-search-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // TODO diff --git a/src/solution/s0213_house_robber_ii.rs b/src/solution/s0213_house_robber_ii.rs index 6dac950c..fbe55040 100644 --- a/src/solution/s0213_house_robber_ii.rs +++ b/src/solution/s0213_house_robber_ii.rs @@ -25,6 +25,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/house-robber-ii/ +// discuss: https://leetcode.com/problems/house-robber-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // DP twice: rob first one || not rob first one diff --git a/src/solution/s0214_shortest_palindrome.rs b/src/solution/s0214_shortest_palindrome.rs index a8a23c60..425eec95 100644 --- a/src/solution/s0214_shortest_palindrome.rs +++ b/src/solution/s0214_shortest_palindrome.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/shortest-palindrome/ +// discuss: https://leetcode.com/problems/shortest-palindrome/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0215_kth_largest_element_in_an_array.rs b/src/solution/s0215_kth_largest_element_in_an_array.rs index 3c114990..159e7af6 100644 --- a/src/solution/s0215_kth_largest_element_in_an_array.rs +++ b/src/solution/s0215_kth_largest_element_in_an_array.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/kth-largest-element-in-an-array/ +// discuss: https://leetcode.com/problems/kth-largest-element-in-an-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cmp::Reverse; diff --git a/src/solution/s0216_combination_sum_iii.rs b/src/solution/s0216_combination_sum_iii.rs index d6f797fa..0f714e01 100644 --- a/src/solution/s0216_combination_sum_iii.rs +++ b/src/solution/s0216_combination_sum_iii.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/combination-sum-iii/ +// discuss: https://leetcode.com/problems/combination-sum-iii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0217_contains_duplicate.rs b/src/solution/s0217_contains_duplicate.rs index 6e2c906d..0d2e5e12 100644 --- a/src/solution/s0217_contains_duplicate.rs +++ b/src/solution/s0217_contains_duplicate.rs @@ -26,6 +26,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/contains-duplicate/ +// discuss: https://leetcode.com/problems/contains-duplicate/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0218_the_skyline_problem.rs b/src/solution/s0218_the_skyline_problem.rs index 9e774db0..7f0ba3c1 100644 --- a/src/solution/s0218_the_skyline_problem.rs +++ b/src/solution/s0218_the_skyline_problem.rs @@ -24,6 +24,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/the-skyline-problem/ +// discuss: https://leetcode.com/problems/the-skyline-problem/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0219_contains_duplicate_ii.rs b/src/solution/s0219_contains_duplicate_ii.rs index c5713adb..da446dae 100644 --- a/src/solution/s0219_contains_duplicate_ii.rs +++ b/src/solution/s0219_contains_duplicate_ii.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/contains-duplicate-ii/ +// discuss: https://leetcode.com/problems/contains-duplicate-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashMap; diff --git a/src/solution/s0220_contains_duplicate_iii.rs b/src/solution/s0220_contains_duplicate_iii.rs index a29cb2e5..0677b1d3 100644 --- a/src/solution/s0220_contains_duplicate_iii.rs +++ b/src/solution/s0220_contains_duplicate_iii.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/contains-duplicate-iii/ +// discuss: https://leetcode.com/problems/contains-duplicate-iii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashMap; impl Solution { diff --git a/src/solution/s0221_maximal_square.rs b/src/solution/s0221_maximal_square.rs index 2fbe5b02..34f793ac 100644 --- a/src/solution/s0221_maximal_square.rs +++ b/src/solution/s0221_maximal_square.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/maximal-square/ +// discuss: https://leetcode.com/problems/maximal-square/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0222_count_complete_tree_nodes.rs b/src/solution/s0222_count_complete_tree_nodes.rs index 189fb3dd..ae0d410b 100644 --- a/src/solution/s0222_count_complete_tree_nodes.rs +++ b/src/solution/s0222_count_complete_tree_nodes.rs @@ -24,6 +24,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/count-complete-tree-nodes/ +// discuss: https://leetcode.com/problems/count-complete-tree-nodes/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0223_rectangle_area.rs b/src/solution/s0223_rectangle_area.rs index b90235dd..647b6b2a 100644 --- a/src/solution/s0223_rectangle_area.rs +++ b/src/solution/s0223_rectangle_area.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/rectangle-area/ +// discuss: https://leetcode.com/problems/rectangle-area/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // mention the integer divition diff --git a/src/solution/s0224_basic_calculator.rs b/src/solution/s0224_basic_calculator.rs index 33ed3112..5d917661 100644 --- a/src/solution/s0224_basic_calculator.rs +++ b/src/solution/s0224_basic_calculator.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/basic-calculator/ +// discuss: https://leetcode.com/problems/basic-calculator/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here #[derive(PartialEq, Copy, Clone, Debug)] diff --git a/src/solution/s0225_implement_stack_using_queues.rs b/src/solution/s0225_implement_stack_using_queues.rs index a4ff6a3b..f162e9a6 100644 --- a/src/solution/s0225_implement_stack_using_queues.rs +++ b/src/solution/s0225_implement_stack_using_queues.rs @@ -32,6 +32,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/implement-stack-using-queues/ +// discuss: https://leetcode.com/problems/implement-stack-using-queues/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here struct MyStack { diff --git a/src/solution/s0226_invert_binary_tree.rs b/src/solution/s0226_invert_binary_tree.rs index 30bd001a..1a1b6115 100644 --- a/src/solution/s0226_invert_binary_tree.rs +++ b/src/solution/s0226_invert_binary_tree.rs @@ -32,6 +32,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/invert-binary-tree/ +// discuss: https://leetcode.com/problems/invert-binary-tree/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0227_basic_calculator_ii.rs b/src/solution/s0227_basic_calculator_ii.rs index cd52accb..07e349dd 100644 --- a/src/solution/s0227_basic_calculator_ii.rs +++ b/src/solution/s0227_basic_calculator_ii.rs @@ -35,6 +35,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/basic-calculator-ii/ +// discuss: https://leetcode.com/problems/basic-calculator-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0228_summary_ranges.rs b/src/solution/s0228_summary_ranges.rs index bb36db17..63e8fe77 100644 --- a/src/solution/s0228_summary_ranges.rs +++ b/src/solution/s0228_summary_ranges.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/summary-ranges/ +// discuss: https://leetcode.com/problems/summary-ranges/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0229_majority_element_ii.rs b/src/solution/s0229_majority_element_ii.rs index 26baf79e..fab987ba 100644 --- a/src/solution/s0229_majority_element_ii.rs +++ b/src/solution/s0229_majority_element_ii.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/majority-element-ii/ +// discuss: https://leetcode.com/problems/majority-element-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0230_kth_smallest_element_in_a_bst.rs b/src/solution/s0230_kth_smallest_element_in_a_bst.rs index fe14721f..0533f705 100644 --- a/src/solution/s0230_kth_smallest_element_in_a_bst.rs +++ b/src/solution/s0230_kth_smallest_element_in_a_bst.rs @@ -38,6 +38,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/kth-smallest-element-in-a-bst/ +// discuss: https://leetcode.com/problems/kth-smallest-element-in-a-bst/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cell::RefCell; diff --git a/src/solution/s0231_power_of_two.rs b/src/solution/s0231_power_of_two.rs index 683dfc91..334fc314 100644 --- a/src/solution/s0231_power_of_two.rs +++ b/src/solution/s0231_power_of_two.rs @@ -27,6 +27,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/power-of-two/ +// discuss: https://leetcode.com/problems/power-of-two/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0232_implement_queue_using_stacks.rs b/src/solution/s0232_implement_queue_using_stacks.rs index d7ff9543..70bf3735 100644 --- a/src/solution/s0232_implement_queue_using_stacks.rs +++ b/src/solution/s0232_implement_queue_using_stacks.rs @@ -32,6 +32,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/implement-queue-using-stacks/ +// discuss: https://leetcode.com/problems/implement-queue-using-stacks/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here struct MyQueue { diff --git a/src/solution/s0233_number_of_digit_one.rs b/src/solution/s0233_number_of_digit_one.rs index 74c0091c..60097ed0 100644 --- a/src/solution/s0233_number_of_digit_one.rs +++ b/src/solution/s0233_number_of_digit_one.rs @@ -14,6 +14,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/number-of-digit-one/ +// discuss: https://leetcode.com/problems/number-of-digit-one/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0238_product_of_array_except_self.rs b/src/solution/s0238_product_of_array_except_self.rs index 7134f2ba..ef5683c4 100644 --- a/src/solution/s0238_product_of_array_except_self.rs +++ b/src/solution/s0238_product_of_array_except_self.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/product-of-array-except-self/ +// discuss: https://leetcode.com/problems/product-of-array-except-self/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0239_sliding_window_maximum.rs b/src/solution/s0239_sliding_window_maximum.rs index 116218f6..f7509cb9 100644 --- a/src/solution/s0239_sliding_window_maximum.rs +++ b/src/solution/s0239_sliding_window_maximum.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/sliding-window-maximum/ +// discuss: https://leetcode.com/problems/sliding-window-maximum/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::VecDeque; diff --git a/src/solution/s0241_different_ways_to_add_parentheses.rs b/src/solution/s0241_different_ways_to_add_parentheses.rs index cdb5ceaa..a76bfa6a 100644 --- a/src/solution/s0241_different_ways_to_add_parentheses.rs +++ b/src/solution/s0241_different_ways_to_add_parentheses.rs @@ -27,6 +27,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/different-ways-to-add-parentheses/ +// discuss: https://leetcode.com/problems/different-ways-to-add-parentheses/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0242_valid_anagram.rs b/src/solution/s0242_valid_anagram.rs index 8c809549..ba7a58ae 100644 --- a/src/solution/s0242_valid_anagram.rs +++ b/src/solution/s0242_valid_anagram.rs @@ -26,6 +26,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/valid-anagram/ +// discuss: https://leetcode.com/problems/valid-anagram/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0257_binary_tree_paths.rs b/src/solution/s0257_binary_tree_paths.rs index c5d6d336..6c7833e2 100644 --- a/src/solution/s0257_binary_tree_paths.rs +++ b/src/solution/s0257_binary_tree_paths.rs @@ -24,6 +24,9 @@ pub struct Solution {} use crate::util::tree::{to_tree, TreeNode}; +// problem: https://leetcode.com/problems/binary-tree-paths/ +// discuss: https://leetcode.com/problems/binary-tree-paths/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // Definition for a binary tree node. diff --git a/src/solution/s0258_add_digits.rs b/src/solution/s0258_add_digits.rs index 1ebeda42..2248be1d 100644 --- a/src/solution/s0258_add_digits.rs +++ b/src/solution/s0258_add_digits.rs @@ -17,6 +17,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/add-digits/ +// discuss: https://leetcode.com/problems/add-digits/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0260_single_number_iii.rs b/src/solution/s0260_single_number_iii.rs index 2735cb7d..09d7a920 100644 --- a/src/solution/s0260_single_number_iii.rs +++ b/src/solution/s0260_single_number_iii.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/single-number-iii/ +// discuss: https://leetcode.com/problems/single-number-iii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0263_ugly_number.rs b/src/solution/s0263_ugly_number.rs index 1ad0a3cc..9ef3bf57 100644 --- a/src/solution/s0263_ugly_number.rs +++ b/src/solution/s0263_ugly_number.rs @@ -37,6 +37,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/ugly-number/ +// discuss: https://leetcode.com/problems/ugly-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0264_ugly_number_ii.rs b/src/solution/s0264_ugly_number_ii.rs index 48be94d1..8dda4f01 100644 --- a/src/solution/s0264_ugly_number_ii.rs +++ b/src/solution/s0264_ugly_number_ii.rs @@ -21,6 +21,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/ugly-number-ii/ +// discuss: https://leetcode.com/problems/ugly-number-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0268_missing_number.rs b/src/solution/s0268_missing_number.rs index c8636b99..63291ee0 100644 --- a/src/solution/s0268_missing_number.rs +++ b/src/solution/s0268_missing_number.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/missing-number/ +// discuss: https://leetcode.com/problems/missing-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0273_integer_to_english_words.rs b/src/solution/s0273_integer_to_english_words.rs index 7119014d..123a1f9d 100644 --- a/src/solution/s0273_integer_to_english_words.rs +++ b/src/solution/s0273_integer_to_english_words.rs @@ -33,6 +33,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/integer-to-english-words/ +// discuss: https://leetcode.com/problems/integer-to-english-words/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // static digits: Vec<&str> = vec!["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"]; diff --git a/src/solution/s0274_h_index.rs b/src/solution/s0274_h_index.rs index 936ba1e7..b36f65a3 100644 --- a/src/solution/s0274_h_index.rs +++ b/src/solution/s0274_h_index.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/h-index/ +// discuss: https://leetcode.com/problems/h-index/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0275_h_index_ii.rs b/src/solution/s0275_h_index_ii.rs index 63e21671..027ad02a 100644 --- a/src/solution/s0275_h_index_ii.rs +++ b/src/solution/s0275_h_index_ii.rs @@ -29,6 +29,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/h-index-ii/ +// discuss: https://leetcode.com/problems/h-index-ii/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0279_perfect_squares.rs b/src/solution/s0279_perfect_squares.rs index 349d9584..fe5f0a01 100644 --- a/src/solution/s0279_perfect_squares.rs +++ b/src/solution/s0279_perfect_squares.rs @@ -19,6 +19,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/perfect-squares/ +// discuss: https://leetcode.com/problems/perfect-squares/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // BFS diff --git a/src/solution/s0282_expression_add_operators.rs b/src/solution/s0282_expression_add_operators.rs index a1c9d776..1c41367b 100644 --- a/src/solution/s0282_expression_add_operators.rs +++ b/src/solution/s0282_expression_add_operators.rs @@ -39,6 +39,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/expression-add-operators/ +// discuss: https://leetcode.com/problems/expression-add-operators/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0283_move_zeroes.rs b/src/solution/s0283_move_zeroes.rs index 1087acab..6581bcaf 100644 --- a/src/solution/s0283_move_zeroes.rs +++ b/src/solution/s0283_move_zeroes.rs @@ -18,6 +18,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/move-zeroes/ +// discuss: https://leetcode.com/problems/move-zeroes/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0287_find_the_duplicate_number.rs b/src/solution/s0287_find_the_duplicate_number.rs index d0111840..cea65001 100644 --- a/src/solution/s0287_find_the_duplicate_number.rs +++ b/src/solution/s0287_find_the_duplicate_number.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/find-the-duplicate-number/ +// discuss: https://leetcode.com/problems/find-the-duplicate-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // 假如把值看做 next node 的下标, 那么: diff --git a/src/solution/s0289_game_of_life.rs b/src/solution/s0289_game_of_life.rs index 37e81fc3..53d34623 100644 --- a/src/solution/s0289_game_of_life.rs +++ b/src/solution/s0289_game_of_life.rs @@ -43,6 +43,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/game-of-life/ +// discuss: https://leetcode.com/problems/game-of-life/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // in-place: 1: live->live, 0: die->die, 2: die->live, 3: live->die diff --git a/src/solution/s0290_word_pattern.rs b/src/solution/s0290_word_pattern.rs index adb5cb0e..c758f352 100644 --- a/src/solution/s0290_word_pattern.rs +++ b/src/solution/s0290_word_pattern.rs @@ -35,6 +35,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/word-pattern/ +// discuss: https://leetcode.com/problems/word-pattern/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::HashMap; diff --git a/src/solution/s0292_nim_game.rs b/src/solution/s0292_nim_game.rs index ff0e1444..4c46505c 100644 --- a/src/solution/s0292_nim_game.rs +++ b/src/solution/s0292_nim_game.rs @@ -16,6 +16,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/nim-game/ +// discuss: https://leetcode.com/problems/nim-game/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0295_find_median_from_data_stream.rs b/src/solution/s0295_find_median_from_data_stream.rs index f400c5b0..02dc5331 100644 --- a/src/solution/s0295_find_median_from_data_stream.rs +++ b/src/solution/s0295_find_median_from_data_stream.rs @@ -39,6 +39,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/find-median-from-data-stream/ +// discuss: https://leetcode.com/problems/find-median-from-data-stream/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cmp::Ordering; diff --git a/src/solution/s0299_bulls_and_cows.rs b/src/solution/s0299_bulls_and_cows.rs index 3ef77009..08525c71 100644 --- a/src/solution/s0299_bulls_and_cows.rs +++ b/src/solution/s0299_bulls_and_cows.rs @@ -29,6 +29,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/bulls-and-cows/ +// discuss: https://leetcode.com/problems/bulls-and-cows/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0300_longest_increasing_subsequence.rs b/src/solution/s0300_longest_increasing_subsequence.rs index cf5eee05..c0b7eb27 100644 --- a/src/solution/s0300_longest_increasing_subsequence.rs +++ b/src/solution/s0300_longest_increasing_subsequence.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/longest-increasing-subsequence/ +// discuss: https://leetcode.com/problems/longest-increasing-subsequence/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // N^2, DP: L[i] = max(1 + L[j]) for j in [0, i) and nums[j] < nums[i] // N * logN, kick out strategy, maintain an increasing array, new elements kick out a formal one larger than it, if the new element is largest, expand the array diff --git a/src/solution/s0301_remove_invalid_parentheses.rs b/src/solution/s0301_remove_invalid_parentheses.rs index 6d6f2f51..2cec757c 100644 --- a/src/solution/s0301_remove_invalid_parentheses.rs +++ b/src/solution/s0301_remove_invalid_parentheses.rs @@ -28,6 +28,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/remove-invalid-parentheses/ +// discuss: https://leetcode.com/problems/remove-invalid-parentheses/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // 1. Calculate the number of misplaced left parenthese and right parenthese diff --git a/src/solution/s0303_range_sum_query_immutable.rs b/src/solution/s0303_range_sum_query_immutable.rs index 0143a4ab..c56f8ae9 100644 --- a/src/solution/s0303_range_sum_query_immutable.rs +++ b/src/solution/s0303_range_sum_query_immutable.rs @@ -22,6 +22,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/range-sum-query-immutable/ +// discuss: https://leetcode.com/problems/range-sum-query-immutable/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here struct NumArray { diff --git a/src/solution/s0304_range_sum_query_2d_immutable.rs b/src/solution/s0304_range_sum_query_2d_immutable.rs index d9775add..42a0f41f 100644 --- a/src/solution/s0304_range_sum_query_2d_immutable.rs +++ b/src/solution/s0304_range_sum_query_2d_immutable.rs @@ -34,6 +34,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/range-sum-query-2d-immutable/ +// discuss: https://leetcode.com/problems/range-sum-query-2d-immutable/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here struct NumMatrix { diff --git a/src/solution/s0306_additive_number.rs b/src/solution/s0306_additive_number.rs index 08b926f4..38f6c0b2 100644 --- a/src/solution/s0306_additive_number.rs +++ b/src/solution/s0306_additive_number.rs @@ -31,6 +31,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/additive-number/ +// discuss: https://leetcode.com/problems/additive-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here // first_cut second_cut third_cut diff --git a/src/solution/s0307_range_sum_query_mutable.rs b/src/solution/s0307_range_sum_query_mutable.rs index 74ec6139..bbaac119 100644 --- a/src/solution/s0307_range_sum_query_mutable.rs +++ b/src/solution/s0307_range_sum_query_mutable.rs @@ -36,6 +36,9 @@ pub struct Solution {} // / \ / \ / \ // N[0] N[1] N[2] N[3] N[4] N[5] // +// problem: https://leetcode.com/problems/range-sum-query-mutable/ +// discuss: https://leetcode.com/problems/range-sum-query-mutable/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here struct NumArray { diff --git a/src/solution/s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs b/src/solution/s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs index 0f3f2765..6f3e911d 100644 --- a/src/solution/s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs +++ b/src/solution/s0309_best_time_to_buy_and_sell_stock_with_cooldown.rs @@ -20,6 +20,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/ +// discuss: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0310_minimum_height_trees.rs b/src/solution/s0310_minimum_height_trees.rs index ab1337e2..4141273c 100644 --- a/src/solution/s0310_minimum_height_trees.rs +++ b/src/solution/s0310_minimum_height_trees.rs @@ -47,6 +47,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/minimum-height-trees/ +// discuss: https://leetcode.com/problems/minimum-height-trees/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::mem; diff --git a/src/solution/s0312_burst_balloons.rs b/src/solution/s0312_burst_balloons.rs index 689db341..f8833b5e 100644 --- a/src/solution/s0312_burst_balloons.rs +++ b/src/solution/s0312_burst_balloons.rs @@ -23,6 +23,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/burst-balloons/ +// discuss: https://leetcode.com/problems/burst-balloons/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here /* diff --git a/src/solution/s0313_super_ugly_number.rs b/src/solution/s0313_super_ugly_number.rs index 78c54fa8..bf99bcc8 100644 --- a/src/solution/s0313_super_ugly_number.rs +++ b/src/solution/s0313_super_ugly_number.rs @@ -25,6 +25,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/super-ugly-number/ +// discuss: https://leetcode.com/problems/super-ugly-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cmp::Ordering; diff --git a/src/solution/s0509_fibonacci_number.rs b/src/solution/s0509_fibonacci_number.rs index b4a5d918..47a9b420 100644 --- a/src/solution/s0509_fibonacci_number.rs +++ b/src/solution/s0509_fibonacci_number.rs @@ -45,6 +45,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/fibonacci-number/ +// discuss: https://leetcode.com/problems/fibonacci-number/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s0704_binary_search.rs b/src/solution/s0704_binary_search.rs index c75364ed..26ed0c8d 100644 --- a/src/solution/s0704_binary_search.rs +++ b/src/solution/s0704_binary_search.rs @@ -34,6 +34,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/binary-search/ +// discuss: https://leetcode.com/problems/binary-search/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::cmp::Ordering; diff --git a/src/solution/s0969_pancake_sorting.rs b/src/solution/s0969_pancake_sorting.rs index 6a32ea04..541ae423 100644 --- a/src/solution/s0969_pancake_sorting.rs +++ b/src/solution/s0969_pancake_sorting.rs @@ -44,6 +44,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/pancake-sorting/ +// discuss: https://leetcode.com/problems/pancake-sorting/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s1018_binary_prefix_divisible_by_5.rs b/src/solution/s1018_binary_prefix_divisible_by_5.rs index ff05f8c6..b2bb1839 100644 --- a/src/solution/s1018_binary_prefix_divisible_by_5.rs +++ b/src/solution/s1018_binary_prefix_divisible_by_5.rs @@ -47,6 +47,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/binary-prefix-divisible-by-5/ +// discuss: https://leetcode.com/problems/binary-prefix-divisible-by-5/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { diff --git a/src/solution/s1046_last_stone_weight.rs b/src/solution/s1046_last_stone_weight.rs index cf0c81ac..871b4eb4 100644 --- a/src/solution/s1046_last_stone_weight.rs +++ b/src/solution/s1046_last_stone_weight.rs @@ -36,6 +36,9 @@ */ pub struct Solution {} +// problem: https://leetcode.com/problems/last-stone-weight/ +// discuss: https://leetcode.com/problems/last-stone-weight/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here use std::collections::BinaryHeap; From f1243fd9b0e02c7ef4fe4eb3ba9331853f3c5655 Mon Sep 17 00:00:00 2001 From: Tianyi Shi Date: Thu, 8 Oct 2020 13:13:42 +0100 Subject: [PATCH 36/47] fix 26 --- src/solution/s0026_remove_duplicates_from_sorted_array.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/solution/s0026_remove_duplicates_from_sorted_array.rs b/src/solution/s0026_remove_duplicates_from_sorted_array.rs index 29ae1485..286b7c54 100644 --- a/src/solution/s0026_remove_duplicates_from_sorted_array.rs +++ b/src/solution/s0026_remove_duplicates_from_sorted_array.rs @@ -45,9 +45,9 @@ */ pub struct Solution {} -// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-array/ -// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query= - +// problem: https://leetcode.com/problems/remove-duplicates-from-sorted-array/ +// discuss: https://leetcode.com/problems/remove-duplicates-from-sorted-array/discuss/?currentPage=1&orderBy=most_votes&query= + // submission codes start here impl Solution { @@ -63,6 +63,7 @@ impl Solution { nums[slow] = nums[fast]; } } + nums.truncate(slow + 1); (slow + 1) as i32 } } From 5b6949bde390f7d26a1cd499f611f32ed144d890 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 00:18:25 +0000 Subject: [PATCH 37/47] Bump net2 from 0.2.33 to 0.2.37 Bumps [net2](https://github.com/deprecrated/net2-rs) from 0.2.33 to 0.2.37. - [Release notes](https://github.com/deprecrated/net2-rs/releases) - [Commits](https://github.com/deprecrated/net2-rs/compare/0.2.33...0.2.37) --- updated-dependencies: - dependency-name: net2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 1452 ++++++++++++++++++++++++++-------------------------- 1 file changed, 726 insertions(+), 726 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a282f353..b89f8b5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,2000 +1,2000 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" [[package]] name = "aho-corasick" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "anyhow" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" [[package]] name = "arrayvec" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" dependencies = [ - "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop", ] [[package]] name = "autocfg" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" [[package]] name = "backtrace" version = "0.3.38" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5" dependencies = [ - "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys", + "cfg-if", + "libc", + "rustc-demangle", ] [[package]] name = "backtrace-sys" version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", ] [[package]] name = "base64" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", ] [[package]] name = "bitflags" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a606a02debe2813760609f57a64a2ffd27d9fdf5b2f133eaca0b248dd92cdd2" [[package]] name = "bumpalo" version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" [[package]] name = "byteorder" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" [[package]] name = "bytes" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "either", + "iovec", ] [[package]] name = "c2-chacha" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "ppv-lite86", ] [[package]] name = "cc" version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", ] [[package]] name = "cookie" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" dependencies = [ - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "time", + "url 1.7.2", ] [[package]] name = "cookie_store" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" dependencies = [ - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie", + "failure", + "idna 0.1.5", + "log", + "publicsuffix", + "serde", + "serde_json", + "time", + "try_from", + "url 1.7.2", ] [[package]] name = "core-foundation" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", + "libc", ] [[package]] name = "core-foundation-sys" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" [[package]] name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "crossbeam-channel" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", ] [[package]] name = "crossbeam-deque" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" dependencies = [ - "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" dependencies = [ - "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayvec", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", ] [[package]] name = "crossbeam-queue" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", ] [[package]] name = "crossbeam-utils" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "lazy_static", ] [[package]] name = "curl" version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06aa71e9208a54def20792d877bc663d6aae0732b9852e612c4a933177c31283" dependencies = [ - "curl-sys 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.50 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi 0.3.8", ] [[package]] name = "curl-sys" version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c38ca47d60b86d0cc9d42caa90a0885669c2abc9791f871c81f58cdf39e979b" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "libnghttp2-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.50 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "libnghttp2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi 0.3.8", ] [[package]] name = "dtoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" [[package]] name = "either" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "encoding_rs" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "error-chain" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" dependencies = [ - "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "version_check", ] [[package]] name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" dependencies = [ - "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace", + "failure_derive", ] [[package]] name = "failure_derive" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", + "synstructure", ] [[package]] name = "flate2" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad3c5233c9a940c8719031b423d7e6c16af66e031cb0420b0896f5245bf181d3" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "foreign-types" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types-shared", ] [[package]] name = "foreign-types-shared" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "fuchsia-zircon-sys", ] [[package]] name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" [[package]] name = "futures" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] name = "futures-channel" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-sink", ] [[package]] name = "futures-channel-preview" version = "0.3.0-alpha.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" dependencies = [ - "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview", + "futures-sink-preview", ] [[package]] name = "futures-core" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" [[package]] name = "futures-core-preview" version = "0.3.0-alpha.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" [[package]] name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "num_cpus", ] [[package]] name = "futures-executor" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" dependencies = [ - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-task", + "futures-util", + "num_cpus", ] [[package]] name = "futures-executor-preview" version = "0.3.0-alpha.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75236e88bd9fe88e5e8bfcd175b665d0528fe03ca4c5207fabc028c8f9d93e98" dependencies = [ - "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core-preview", + "futures-util-preview", + "num_cpus", ] [[package]] name = "futures-io" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" [[package]] name = "futures-io-preview" version = "0.3.0-alpha.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4914ae450db1921a56c91bde97a27846287d062087d4a652efc09bb3a01ebda" [[package]] name = "futures-macro" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" dependencies = [ - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack", + "proc-macro2 1.0.5", + "quote 1.0.2", + "syn 1.0.5", ] [[package]] name = "futures-preview" version = "0.3.0-alpha.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1dce2a0267ada5c6ff75a8ba864b4e679a9e2aa44262af7a3b5516d530d76e" dependencies = [ - "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-executor-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel-preview", + "futures-core-preview", + "futures-executor-preview", + "futures-io-preview", + "futures-sink-preview", + "futures-util-preview", ] [[package]] name = "futures-sink" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" [[package]] name = "futures-sink-preview" version = "0.3.0-alpha.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec" [[package]] name = "futures-task" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" [[package]] name = "futures-util" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" dependencies = [ - "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-utils", + "proc-macro-hack", + "proc-macro-nested", + "slab", ] [[package]] name = "futures-util-preview" version = "0.3.0-alpha.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "futures-channel-preview", + "futures-core-preview", + "futures-io-preview", + "futures-sink-preview", + "memchr", + "pin-utils", + "slab", + "tokio-io", ] [[package]] name = "getrandom" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "wasi", ] [[package]] name = "h2" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder", + "bytes", + "fnv", + "futures 0.1.29", + "http", + "indexmap", + "log", + "slab", + "string", + "tokio-io", ] [[package]] name = "heck" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-segmentation", ] [[package]] name = "http" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "fnv", + "itoa", ] [[package]] name = "http-body" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures 0.1.29", + "http", + "tokio-buf", ] [[package]] name = "httparse" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" [[package]] name = "hyper" version = "0.12.35" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" +dependencies = [ + "bytes", + "futures 0.1.29", + "futures-cpupool", + "h2", + "http", + "http-body", + "httparse", + "iovec", + "itoa", + "log", + "net2", + "rustc_version", + "time", + "tokio", + "tokio-buf", + "tokio-executor", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", + "want", ] [[package]] name = "hyper-tls" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures 0.1.29", + "hyper", + "native-tls", + "tokio-io", ] [[package]] name = "idna" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "idna" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "indexmap" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" [[package]] name = "iovec" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9636900aa73ffed13cdbb199f17cd955670bb300927c8d25b517dfa136b6567" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "isahc" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b77027f12e53ae59a379f7074259d32eb10867e6183388020e922832d9c3fb" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "curl 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "sluice 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "crossbeam-channel", + "crossbeam-utils", + "curl", + "curl-sys", + "futures-io-preview", + "futures-util-preview", + "http", + "lazy_static", + "log", + "slab", + "sluice", ] [[package]] name = "itoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" [[package]] name = "js-sys" version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" dependencies = [ - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen", ] [[package]] name = "kernel32-sys" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8", + "winapi-build", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "leetcode-rust" version = "0.1.0" dependencies = [ - "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", - "surf 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4", + "rand 0.6.5", + "regex", + "reqwest", + "serde", + "serde_derive", + "serde_json", + "surf", ] [[package]] name = "libc" version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" [[package]] name = "libnghttp2-sys" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02254d44f4435dd79e695f2c2b83cd06a47919adea30216ceaf0c57ca0a72463" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", ] [[package]] name = "libz-sys" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" dependencies = [ - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "lock_api" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" dependencies = [ - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard", ] [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" [[package]] name = "memoffset" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version", ] [[package]] name = "mime" version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" [[package]] name = "mime_guess" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" dependencies = [ - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mime", + "unicase", ] [[package]] name = "miniz_oxide" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "304f66c19be2afa56530fa7c39796192eef38618da8d19df725ad7c6d6b2aaae" dependencies = [ - "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32", ] [[package]] name = "mio" version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", ] [[package]] name = "miow" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", ] [[package]] name = "native-tls" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.50 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] name = "net2" -version = "0.2.33" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "winapi 0.3.8", ] [[package]] name = "nodrop" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" [[package]] name = "nom" version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", + "version_check", ] [[package]] name = "num_cpus" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] name = "openssl" version = "0.10.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f372b2b53ce10fb823a337aaa674e3a7d072b957c6264d0f4ff0bd86e657449" dependencies = [ - "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.50 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "cfg-if", + "foreign-types", + "lazy_static", + "libc", + "openssl-sys", ] [[package]] name = "openssl-probe" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" version = "0.9.50" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c42dcccb832556b5926bc9ae61e8775f2a61e725ab07ab3d1e7fcf8ae62c3b6" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "parking_lot" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" dependencies = [ - "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api", + "parking_lot_core", + "rustc_version", ] [[package]] name = "parking_lot_core" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "cloudabi", + "libc", + "redox_syscall", + "rustc_version", + "smallvec", + "winapi 0.3.8", ] [[package]] name = "percent-encoding" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pin-utils" version = "0.1.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" [[package]] name = "pkg-config" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d5370d90f49f70bd033c3d75e87fc529fbfff9d6f7cccef07d6170079d91ea" [[package]] name = "ppv-lite86" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" [[package]] name = "proc-macro-hack" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" dependencies = [ - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5", + "quote 1.0.2", + "syn 1.0.5", ] [[package]] name = "proc-macro-nested" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" [[package]] name = "proc-macro2" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0", ] [[package]] name = "proc-macro2" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90cf5f418035b98e655e9cdb225047638296b862b42411c4e45bb88d700f7fc0" dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0", ] [[package]] name = "publicsuffix" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bf259a81de2b2eb9850ec990ec78e6a25319715584fd7652b9b26f96fcb1510" dependencies = [ - "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain", + "idna 0.2.0", + "lazy_static", + "regex", + "url 2.1.0", ] [[package]] name = "quote" version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", ] [[package]] name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" dependencies = [ - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5", ] [[package]] name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc 0.1.0", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi 0.3.8", ] [[package]] name = "rand" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" dependencies = [ - "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "libc", + "rand_chacha 0.2.1", + "rand_core 0.5.1", + "rand_hc 0.2.0", ] [[package]] name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "rand_core 0.3.1", ] [[package]] name = "rand_chacha" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" dependencies = [ - "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "c2-chacha", + "rand_core 0.5.1", ] [[package]] name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2", ] [[package]] name = "rand_core" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", ] [[package]] name = "rand_hc" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1", ] [[package]] name = "rand_isaac" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "rand_core 0.4.2", + "winapi 0.3.8", ] [[package]] name = "rand_os" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi 0.3.8", ] [[package]] name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg", + "rand_core 0.4.2", ] [[package]] name = "rand_xorshift" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rdrand" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" [[package]] name = "regex" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] name = "regex-syntax" version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" [[package]] name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "reqwest" version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +checksum = "02b7e953e14c6f3102b7e8d1f1ee3abf5ecee80b427f5565c9389835cecae95c" +dependencies = [ + "base64", + "bytes", + "cookie", + "cookie_store", + "encoding_rs", + "flate2", + "futures 0.1.29", + "http", + "hyper", + "hyper-tls", + "log", + "mime", + "mime_guess", + "native-tls", + "serde", + "serde_json", + "serde_urlencoded 0.5.5", + "time", + "tokio", + "tokio-executor", + "tokio-io", + "tokio-threadpool", + "tokio-timer", + "url 1.7.2", + "uuid", + "winreg", ] [[package]] name = "rustc-demangle" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" [[package]] name = "rustc_version" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver", ] [[package]] name = "ryu" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" [[package]] name = "schannel" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "winapi 0.3.8", ] [[package]] name = "scopeguard" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" [[package]] name = "security-framework" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" dependencies = [ - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] name = "security-framework-sys" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys", ] [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", ] [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd" dependencies = [ - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" dependencies = [ - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5", + "quote 1.0.2", + "syn 1.0.5", ] [[package]] name = "serde_json" version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa", + "ryu", + "serde", ] [[package]] name = "serde_urlencoded" version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa", + "itoa", + "serde", + "url 1.7.2", ] [[package]] name = "serde_urlencoded" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dtoa", + "itoa", + "serde", + "url 2.1.0", ] [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "sluice" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7d06dfb3e8743bc19e6de8a302277471d08077d68946b307280496dc5a3531" dependencies = [ - "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel-preview", + "futures-core-preview", + "futures-io-preview", ] [[package]] name = "smallvec" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" [[package]] name = "socket2" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "redox_syscall", + "winapi 0.3.8", ] [[package]] name = "sourcefile" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" [[package]] name = "string" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", ] [[package]] name = "surf" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741a8008f8a833ef16f47df94a30754478fb2c2bf822b9c2e6f7f09203b97ace" dependencies = [ - "futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "isahc 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-preview", + "http", + "isahc", + "js-sys", + "log", + "mime", + "mime_guess", + "serde", + "serde_json", + "serde_urlencoded 0.6.1", + "url 2.1.0", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] name = "syn" version = "0.15.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", ] [[package]] name = "syn" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" dependencies = [ - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5", + "quote 1.0.2", + "unicode-xid 0.2.0", ] [[package]] name = "synstructure" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", + "unicode-xid 0.1.0", ] [[package]] name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "libc", + "rand 0.7.2", + "redox_syscall", + "remove_dir_all", + "winapi 0.3.8", ] [[package]] name = "thread_local" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] [[package]] name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "redox_syscall", + "winapi 0.3.8", ] [[package]] name = "tokio" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures 0.1.29", + "mio", + "num_cpus", + "tokio-current-thread", + "tokio-executor", + "tokio-io", + "tokio-reactor", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", ] [[package]] name = "tokio-buf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "either", + "futures 0.1.29", ] [[package]] name = "tokio-current-thread" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "tokio-executor", ] [[package]] name = "tokio-executor" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", + "futures 0.1.29", ] [[package]] name = "tokio-io" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures 0.1.29", + "log", ] [[package]] name = "tokio-reactor" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", + "futures 0.1.29", + "lazy_static", + "log", + "mio", + "num_cpus", + "parking_lot", + "slab", + "tokio-executor", + "tokio-io", + "tokio-sync", ] [[package]] name = "tokio-sync" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" dependencies = [ - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv", + "futures 0.1.29", ] [[package]] name = "tokio-tcp" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures 0.1.29", + "iovec", + "mio", + "tokio-io", + "tokio-reactor", ] [[package]] name = "tokio-threadpool" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" dependencies = [ - "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "futures 0.1.29", + "lazy_static", + "log", + "num_cpus", + "slab", + "tokio-executor", ] [[package]] name = "tokio-timer" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils", + "futures 0.1.29", + "slab", + "tokio-executor", ] [[package]] name = "try-lock" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" [[package]] name = "try_from" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", ] [[package]] name = "unicase" version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2e6bd1e59e56598518beb94fd6db628ded570326f0a98c679a304bd9f00150" dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check", ] [[package]] name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", ] [[package]] name = "unicode-normalization" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" dependencies = [ - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec", ] [[package]] name = "unicode-segmentation" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" [[package]] name = "url" version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5", + "matches", + "percent-encoding 1.0.1", ] [[package]] name = "url" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" dependencies = [ - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.2.0", + "matches", + "percent-encoding 2.1.0", ] [[package]] name = "uuid" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5", ] [[package]] name = "vcpkg" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" [[package]] name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[package]] name = "want" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29", + "log", + "try-lock", ] [[package]] name = "wasi" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" [[package]] name = "wasm-bindgen" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" dependencies = [ - "bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo", + "lazy_static", + "log", + "proc-macro2 1.0.5", + "quote 1.0.2", + "syn 1.0.5", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c" dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if", + "futures 0.1.29", + "futures-channel-preview", + "futures-util-preview", + "js-sys", + "lazy_static", + "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2", + "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" dependencies = [ - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.5", + "quote 1.0.2", + "syn 1.0.5", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" [[package]] name = "wasm-bindgen-webidl" version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "heck", + "log", + "proc-macro2 1.0.5", + "quote 1.0.2", + "syn 1.0.5", + "wasm-bindgen-backend", + "weedle", ] [[package]] name = "web-sys" version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" dependencies = [ - "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow", + "js-sys", + "sourcefile", + "wasm-bindgen", + "wasm-bindgen-webidl", ] [[package]] name = "weedle" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" dependencies = [ - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "nom", ] [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" [[package]] name = "winapi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winreg" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8", ] [[package]] name = "ws2_32-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" -"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" -"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" -"checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" -"checksum backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5" -"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a606a02debe2813760609f57a64a2ffd27d9fdf5b2f133eaca0b248dd92cdd2" -"checksum bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" -"checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" -"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" -"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" -"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" -"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" -"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" -"checksum curl 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "06aa71e9208a54def20792d877bc663d6aae0732b9852e612c4a933177c31283" -"checksum curl-sys 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "0c38ca47d60b86d0cc9d42caa90a0885669c2abc9791f871c81f58cdf39e979b" -"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" -"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" -"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" -"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" -"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" -"checksum flate2 1.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ad3c5233c9a940c8719031b423d7e6c16af66e031cb0420b0896f5245bf181d3" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" -"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" -"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" -"checksum futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" -"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" -"checksum futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" -"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -"checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" -"checksum futures-executor-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "75236e88bd9fe88e5e8bfcd175b665d0528fe03ca4c5207fabc028c8f9d93e98" -"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" -"checksum futures-io-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "f4914ae450db1921a56c91bde97a27846287d062087d4a652efc09bb3a01ebda" -"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" -"checksum futures-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3b1dce2a0267ada5c6ff75a8ba864b4e679a9e2aa44262af7a3b5516d530d76e" -"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" -"checksum futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec" -"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" -"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" -"checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" -"checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" -"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" -"checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" -"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" -"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" -"checksum iovec 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c9636900aa73ffed13cdbb199f17cd955670bb300927c8d25b517dfa136b6567" -"checksum isahc 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "17b77027f12e53ae59a379f7074259d32eb10867e6183388020e922832d9c3fb" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" -"checksum libnghttp2-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02254d44f4435dd79e695f2c2b83cd06a47919adea30216ceaf0c57ca0a72463" -"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" -"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" -"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" -"checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" -"checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" -"checksum miniz_oxide 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "304f66c19be2afa56530fa7c39796192eef38618da8d19df725ad7c6d6b2aaae" -"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" -"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" -"checksum openssl 0.10.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2f372b2b53ce10fb823a337aaa674e3a7d072b957c6264d0f4ff0bd86e657449" -"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.50 (registry+https://github.com/rust-lang/crates.io-index)" = "2c42dcccb832556b5926bc9ae61e8775f2a61e725ab07ab3d1e7fcf8ae62c3b6" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" -"checksum pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "72d5370d90f49f70bd033c3d75e87fc529fbfff9d6f7cccef07d6170079d91ea" -"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" -"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" -"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "90cf5f418035b98e655e9cdb225047638296b862b42411c4e45bb88d700f7fc0" -"checksum publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9bf259a81de2b2eb9850ec990ec78e6a25319715584fd7652b9b26f96fcb1510" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum regex 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" -"checksum regex-syntax 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b28dfe3fe9badec5dbf0a79a9cccad2cfc2ab5484bdb3e44cbd1ae8b3ba2be06" -"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)" = "02b7e953e14c6f3102b7e8d1f1ee3abf5ecee80b427f5565c9389835cecae95c" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" -"checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" -"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" -"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" -"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd" -"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" -"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" -"checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" -"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum sluice 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7d06dfb3e8743bc19e6de8a302277471d08077d68946b307280496dc5a3531" -"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" -"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" -"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" -"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum surf 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "741a8008f8a833ef16f47df94a30754478fb2c2bf822b9c2e6f7f09203b97ace" -"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" -"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" -"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" -"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" -"checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" -"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d" -"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" -"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" -"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" -"checksum unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2e2e6bd1e59e56598518beb94fd6db628ded570326f0a98c679a304bd9f00150" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" -"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" -"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" -"checksum wasm-bindgen-futures 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c" -"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" -"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" -"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" -"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" -"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" -"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" + "winapi 0.2.8", + "winapi-build", +] From ff1388db643540aa30ba6e850a5c73956dc582e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 01:16:57 +0000 Subject: [PATCH 38/47] Bump smallvec from 0.6.10 to 0.6.14 Bumps [smallvec](https://github.com/servo/rust-smallvec) from 0.6.10 to 0.6.14. - [Release notes](https://github.com/servo/rust-smallvec/releases) - [Commits](https://github.com/servo/rust-smallvec/compare/v0.6.10...v0.6.14) --- updated-dependencies: - dependency-name: smallvec dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b89f8b5a..9bebf83e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -815,6 +815,12 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "memchr" version = "2.2.1" @@ -1464,9 +1470,12 @@ dependencies = [ [[package]] name = "smallvec" -version = "0.6.10" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", +] [[package]] name = "socket2" From afa1287b63aefce0e9f8a19f044e844b09af7e41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 01:16:57 +0000 Subject: [PATCH 39/47] Bump bumpalo from 3.1.2 to 3.10.0 Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.1.2 to 3.10.0. - [Release notes](https://github.com/fitzgen/bumpalo/releases) - [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md) - [Commits](https://github.com/fitzgen/bumpalo/commits) --- updated-dependencies: - dependency-name: bumpalo dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b89f8b5a..68278849 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,9 +77,9 @@ checksum = "8a606a02debe2813760609f57a64a2ffd27d9fdf5b2f133eaca0b248dd92cdd2" [[package]] name = "bumpalo" -version = "3.1.2" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byteorder" From 9996bfdaf645c515b69c1b92a7a1b47f519abe43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 01:17:01 +0000 Subject: [PATCH 40/47] Bump miow from 0.2.1 to 0.2.2 Bumps [miow](https://github.com/yoshuawuyts/miow) from 0.2.1 to 0.2.2. - [Release notes](https://github.com/yoshuawuyts/miow/releases) - [Changelog](https://github.com/yoshuawuyts/miow/blob/master/CHANGELOG.md) - [Commits](https://github.com/yoshuawuyts/miow/compare/0.2.1...0.2.2) --- updated-dependencies: - dependency-name: miow dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b89f8b5a..3e1e5cb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -875,9 +875,9 @@ dependencies = [ [[package]] name = "miow" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" dependencies = [ "kernel32-sys", "net2", From f0cee845df38e05f0c9ac68048c9e12c77195bc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 01:17:02 +0000 Subject: [PATCH 41/47] Bump hyper from 0.12.35 to 0.12.36 Bumps [hyper](https://github.com/hyperium/hyper) from 0.12.35 to 0.12.36. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/v0.12.36/CHANGELOG.md) - [Commits](https://github.com/hyperium/hyper/compare/v0.12.35...v0.12.36) --- updated-dependencies: - dependency-name: hyper dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b89f8b5a..4e594591 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -620,9 +620,9 @@ checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" [[package]] name = "hyper" -version = "0.12.35" +version = "0.12.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" +checksum = "5c843caf6296fc1f93444735205af9ed4e109a539005abb2564ae1d6fad34c52" dependencies = [ "bytes", "futures 0.1.29", From 7ce76081d343a1abd4fbe5ba1f48c63bd4172f09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 01:18:34 +0000 Subject: [PATCH 42/47] Bump crossbeam-deque from 0.7.1 to 0.7.4 Bumps [crossbeam-deque](https://github.com/crossbeam-rs/crossbeam) from 0.7.1 to 0.7.4. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-deque-0.7.1...crossbeam-deque-0.7.4) --- updated-dependencies: - dependency-name: crossbeam-deque dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 74 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b89f8b5a..b8b3cbed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,19 +24,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" [[package]] -name = "arrayvec" -version = "0.4.11" +name = "autocfg" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" -dependencies = [ - "nodrop", -] +checksum = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" [[package]] name = "autocfg" -version = "0.1.6" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -188,29 +185,31 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.6.6", ] [[package]] name = "crossbeam-deque" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" +checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" dependencies = [ "crossbeam-epoch", - "crossbeam-utils", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] name = "crossbeam-epoch" -version = "0.7.2" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "arrayvec", + "autocfg 1.1.0", "cfg-if", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "lazy_static", + "maybe-uninit", "memoffset", "scopeguard", ] @@ -221,7 +220,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.6.6", ] [[package]] @@ -234,6 +233,17 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg 1.1.0", + "cfg-if", + "lazy_static", +] + [[package]] name = "curl" version = "0.4.25" @@ -706,7 +716,7 @@ checksum = "17b77027f12e53ae59a379f7074259d32eb10867e6183388020e922832d9c3fb" dependencies = [ "bytes", "crossbeam-channel", - "crossbeam-utils", + "crossbeam-utils 0.6.6", "curl", "curl-sys", "futures-io-preview", @@ -815,6 +825,12 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "memchr" version = "2.2.1" @@ -914,12 +930,6 @@ dependencies = [ "winapi 0.3.8", ] -[[package]] -name = "nodrop" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" - [[package]] name = "nom" version = "4.2.3" @@ -965,7 +975,7 @@ version = "0.9.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c42dcccb832556b5926bc9ae61e8775f2a61e725ab07ab3d1e7fcf8ae62c3b6" dependencies = [ - "autocfg", + "autocfg 0.1.6", "cc", "libc", "pkg-config", @@ -1100,7 +1110,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg", + "autocfg 0.1.6", "libc", "rand_chacha 0.1.1", "rand_core 0.4.2", @@ -1132,7 +1142,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "autocfg", + "autocfg 0.1.6", "rand_core 0.3.1", ] @@ -1228,7 +1238,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "autocfg", + "autocfg 0.1.6", "rand_core 0.4.2", ] @@ -1631,7 +1641,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.6.6", "futures 0.1.29", ] @@ -1652,7 +1662,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.6.6", "futures 0.1.29", "lazy_static", "log", @@ -1697,7 +1707,7 @@ checksum = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" dependencies = [ "crossbeam-deque", "crossbeam-queue", - "crossbeam-utils", + "crossbeam-utils 0.6.6", "futures 0.1.29", "lazy_static", "log", @@ -1712,7 +1722,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.6.6", "futures 0.1.29", "slab", "tokio-executor", From 19319283bd7cd430267ea009cb6ea2b00e4a7cea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 03:47:23 +0000 Subject: [PATCH 43/47] Bump socket2 from 0.3.11 to 0.3.19 Bumps [socket2](https://github.com/rust-lang/socket2) from 0.3.11 to 0.3.19. - [Release notes](https://github.com/rust-lang/socket2/releases) - [Changelog](https://github.com/rust-lang/socket2/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/socket2/compare/0.3.11...v0.3.19) --- updated-dependencies: - dependency-name: socket2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b8b3cbed..eac83aa4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5" dependencies = [ "backtrace-sys", - "cfg-if", + "cfg-if 0.1.10", "libc", "rustc-demangle", ] @@ -117,6 +117,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + [[package]] name = "cloudabi" version = "0.0.3" @@ -176,7 +182,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -206,7 +212,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ "autocfg 1.1.0", - "cfg-if", + "cfg-if 0.1.10", "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", @@ -229,7 +235,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "lazy_static", ] @@ -240,7 +246,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ "autocfg 1.1.0", - "cfg-if", + "cfg-if 0.1.10", "lazy_static", ] @@ -293,7 +299,7 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -334,7 +340,7 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad3c5233c9a940c8719031b423d7e6c16af66e031cb0420b0896f5245bf181d3" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "crc32fast", "libc", "miniz_oxide", @@ -567,7 +573,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "wasi", ] @@ -775,9 +781,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.62" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libnghttp2-sys" @@ -816,7 +822,7 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -925,7 +931,7 @@ version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "winapi 0.3.8", ] @@ -956,7 +962,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f372b2b53ce10fb823a337aaa674e3a7d072b957c6264d0f4ff0bd86e657449" dependencies = [ "bitflags", - "cfg-if", + "cfg-if 0.1.10", "foreign-types", "lazy_static", "libc", @@ -999,7 +1005,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "cloudabi", "libc", "redox_syscall", @@ -1480,13 +1486,12 @@ checksum = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" [[package]] name = "socket2" -version = "0.3.11" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", - "redox_syscall", "winapi 0.3.8", ] @@ -1567,7 +1572,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "libc", "rand 0.7.2", "redox_syscall", @@ -1740,7 +1745,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", ] [[package]] @@ -1854,7 +1859,7 @@ version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "wasm-bindgen-macro", ] @@ -1879,7 +1884,7 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83420b37346c311b9ed822af41ec2e82839bfe99867ec6c54e2da43b7538771c" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "futures 0.1.29", "futures-channel-preview", "futures-util-preview", From 18239979b507514cd5104d00f4940f82bf2c67b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Jun 2022 03:47:24 +0000 Subject: [PATCH 44/47] Bump http from 0.1.18 to 0.1.21 Bumps [http](https://github.com/hyperium/http) from 0.1.18 to 0.1.21. - [Release notes](https://github.com/hyperium/http/releases) - [Changelog](https://github.com/hyperium/http/blob/v0.1.21/CHANGELOG.md) - [Commits](https://github.com/hyperium/http/compare/v0.1.18...v0.1.21) --- updated-dependencies: - dependency-name: http dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b8b3cbed..7d4bd9dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -601,9 +601,9 @@ dependencies = [ [[package]] name = "http" -version = "0.1.18" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" +checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" dependencies = [ "bytes", "fnv", From 97e672eac23e1881baaf081751777190621665c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jun 2022 00:52:39 +0000 Subject: [PATCH 45/47] Bump futures-util from 0.3.4 to 0.3.21 Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.4 to 0.3.21. - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.4...0.3.21) --- updated-dependencies: - dependency-name: futures-util dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 113 ++++++++++++++++++++++++----------------------------- 1 file changed, 50 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60123c06..fe7a3919 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,9 +412,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -432,9 +432,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-core-preview" @@ -477,9 +477,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-io-preview" @@ -489,14 +489,13 @@ checksum = "f4914ae450db1921a56c91bde97a27846287d062087d4a652efc09bb3a01ebda" [[package]] name = "futures-macro" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.5", + "proc-macro2 1.0.39", "quote 1.0.2", - "syn 1.0.5", + "syn 1.0.96", ] [[package]] @@ -515,9 +514,9 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-sink-preview" @@ -527,15 +526,15 @@ checksum = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec" [[package]] name = "futures-task" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-util" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ "futures-channel", "futures-core", @@ -544,9 +543,8 @@ dependencies = [ "futures-sink", "futures-task", "memchr", + "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -1026,11 +1024,17 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + [[package]] name = "pin-utils" -version = "0.1.0-alpha.4" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" @@ -1044,39 +1048,22 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" -[[package]] -name = "proc-macro-hack" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" -dependencies = [ - "proc-macro2 1.0.5", - "quote 1.0.2", - "syn 1.0.5", -] - -[[package]] -name = "proc-macro-nested" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" - [[package]] name = "proc-macro2" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] name = "proc-macro2" -version = "1.0.5" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90cf5f418035b98e655e9cdb225047638296b862b42411c4e45bb88d700f7fc0" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid 0.2.0", + "unicode-ident", ] [[package]] @@ -1107,7 +1094,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" dependencies = [ - "proc-macro2 1.0.5", + "proc-macro2 1.0.39", ] [[package]] @@ -1421,9 +1408,9 @@ version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" dependencies = [ - "proc-macro2 1.0.5", + "proc-macro2 1.0.39", "quote 1.0.2", - "syn 1.0.5", + "syn 1.0.96", ] [[package]] @@ -1543,18 +1530,18 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] name = "syn" -version = "1.0.5" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ - "proc-macro2 1.0.5", + "proc-macro2 1.0.39", "quote 1.0.2", - "unicode-xid 0.2.0", + "unicode-ident", ] [[package]] @@ -1566,7 +1553,7 @@ dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", "syn 0.15.44", - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] @@ -1769,6 +1756,12 @@ dependencies = [ "matches", ] +[[package]] +name = "unicode-ident" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" + [[package]] name = "unicode-normalization" version = "0.1.8" @@ -1790,12 +1783,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -[[package]] -name = "unicode-xid" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" - [[package]] name = "url" version = "1.7.2" @@ -1875,9 +1862,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.5", + "proc-macro2 1.0.39", "quote 1.0.2", - "syn 1.0.5", + "syn 1.0.96", "wasm-bindgen-shared", ] @@ -1913,9 +1900,9 @@ version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" dependencies = [ - "proc-macro2 1.0.5", + "proc-macro2 1.0.39", "quote 1.0.2", - "syn 1.0.5", + "syn 1.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1935,9 +1922,9 @@ dependencies = [ "anyhow", "heck", "log", - "proc-macro2 1.0.5", + "proc-macro2 1.0.39", "quote 1.0.2", - "syn 1.0.5", + "syn 1.0.96", "wasm-bindgen-backend", "weedle", ] From 673093b49e0ef49a1a2613cccd244f318b09b6d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jun 2022 01:03:46 +0000 Subject: [PATCH 46/47] Bump futures-task from 0.3.4 to 0.3.21 Bumps [futures-task](https://github.com/rust-lang/futures-rs) from 0.3.4 to 0.3.21. - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.4...0.3.21) --- updated-dependencies: - dependency-name: futures-task dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60123c06..51333019 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -527,9 +527,9 @@ checksum = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec" [[package]] name = "futures-task" -version = "0.3.4" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-util" From 57db4afb10b7a4a902107f32cb24c84c87bd7ac8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jun 2022 01:34:26 +0000 Subject: [PATCH 47/47] Bump thread_local from 1.0.1 to 1.1.4 Bumps [thread_local](https://github.com/Amanieu/thread_local-rs) from 1.0.1 to 1.1.4. - [Release notes](https://github.com/Amanieu/thread_local-rs/releases) - [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.0.1...1.1.4) --- updated-dependencies: - dependency-name: thread_local dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60123c06..09da0ecf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -955,6 +955,12 @@ dependencies = [ "libc", ] +[[package]] +name = "once_cell" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" + [[package]] name = "openssl" version = "0.10.25" @@ -1585,11 +1591,11 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.0.1" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ - "lazy_static", + "once_cell", ] [[package]]