├── .vscode ├── c_cpp_properties.json ├── launch.json └── settings.json ├── CodeChef contests ├── 01-Starters 75 Division 4 │ ├── 1-Saving_tax.cpp │ ├── 10-Sum_of_range_distinct_queries.cpp │ ├── 2-Profit_increment.cpp │ ├── 3-Two_ranges.cpp │ ├── 4-Three_powers_of_two.cpp │ ├── 5-Prefix_ones.cpp │ ├── 6-Equal_hamming_distance.cpp │ ├── 7-Chef's_favourite_function.cpp │ ├── 8-Min_replacement.cpp │ └── 9-XOR_X_get_max.cpp ├── 02-Starters 77 Division 4 │ ├── 1-Tom_and_Jerry_chase.cpp │ ├── 10-K_forests.cpp │ ├── 2-Cofechef_airlines.cpp │ ├── 3-Tekken.cpp │ ├── 4-Concat_palindrome.cpp │ ├── 5-Three_numbers.cpp │ ├── 6-Spreading_charges.cpp │ ├── 7-K_increment_palindrome.cpp │ ├── 8-Yet_another_XOR_sort.cpp │ └── 9-Sort_a_string.cpp ├── 03-Starters 104 Division 4 │ ├── 1-Double_rent.cpp │ ├── 10-Combinatorics_is_fun.cpp │ ├── 2-Pizza_cutting.cpp │ ├── 3-Santa_and_chocolates.cpp │ ├── 4-GCD_and_LCM.cpp │ ├── 5-Maximise_sum.cpp │ ├── 6-Lexicographically_largest.cpp │ ├── 7-Construct_an_array.cpp │ ├── 8-Find_diameter.cpp │ └── 9-Longest_non_decreasing.cpp ├── 04-Starters 124 Division 4 │ ├── 1-Summer_time.cpp │ ├── 2-Cricket_tournament.cpp │ ├── 3-Binary_parity.cpp │ ├── 4-Table_strength.cpp │ ├── 5-Swap_and_unite.cpp │ ├── 6-Make_it_one.cpp │ ├── 7-How_many_arrays.cpp │ ├── 8-It_is_tree.cpp │ └── 9-Random_coloring.cpp ├── 05-Starters 131 Division 4 │ ├── 1-Remaining_neighborhoods.cpp │ ├── 2-Gotta_catch_em_all.cpp │ ├── 3-Dice_deception.cpp │ ├── 4-K_closeness.cpp │ ├── 5-Encrypt_value.cpp │ ├── 6-T_perm.cpp │ ├── 7-Digit_space.cpp │ ├── 8-ABC_conjecture-II.cpp │ └── 9-Chef_needs_to_return_videotapes.cpp ├── 06-Starters 134 Division 4 │ ├── 1-Morning_run.cpp │ ├── 2-Money_double.cpp │ ├── 3-Rock_paper_scissors.cpp │ ├── 4-Origin.cpp │ ├── 5-3out1in.cpp │ ├── 6-Prison_escape.cpp │ ├── 7-Chef_and_bit_tree.cpp │ ├── 8-Permutation_cycle_queries.cpp │ └── 9-Count_good_RBS.cpp ├── 07-Starters 135 Division 3 │ ├── 1-Football_ties.cpp │ ├── 2-Invert_and_equalize.cpp │ ├── 3-Change_A_to_B.cpp │ ├── 4-Graph_cost.cpp │ ├── 5-Limit_of_MEX.cpp │ ├── 6-Envious_pile.cpp │ ├── 7-Milky_dark_chocolates.cpp │ └── 8-RCB_vs_CSK.cpp ├── 08-Starters 136 Division 3 │ ├── 1-Even_sum_subarray.cpp │ ├── 2-My_first_geometry_problem.cpp │ ├── 3-Sum_of_modes.cpp │ ├── 4-Sum_of_max_K_subarray.cpp │ ├── 5-Lexicographically_maximal_prefix_AND.cpp │ ├── 6-Non-zero_XOR.cpp │ ├── 7-Game_on_rectangle.cpp │ ├── 8-Who_makes_P1.cpp │ └── 9-Min_segments.cpp └── 09-Starters 137 Division 3 │ ├── 1-Spell_splice.cpp │ ├── 2-Large_differences.cpp │ ├── 3-Double_trouble.cpp │ ├── 4-Speedrun.cpp │ ├── 5-Unusual_queries.cpp │ ├── 6-Coprime_subarrays.cpp │ ├── 7-Concat_lexman_substrs.cpp │ └── 8-Election_hopes.cpp ├── Codeforces contests ├── 01-Codeforces Round 918 (Div. 4) │ ├── 1-Odd_one_out.cpp │ ├── 2-Not_quite_latin_square.cpp │ ├── 3-Can_I_square.cpp │ ├── 4-Unnatural_language_processing.cpp │ ├── 5-Romantic_glasses.cpp │ ├── 6-Greetings.cpp │ └── 7-Bicycles.cpp └── 02-Educational Codeforces Round 166 (Rated for Div. 2) │ ├── 1-Verify_password.cpp │ ├── 2-Increase_decrease_copy.cpp │ ├── 3-Job_interview.cpp │ ├── 4-Invertible_bracket_subsequences.cpp │ ├── 5-Splittable_permutations.cpp │ └── 6-Remove_bridges.cpp ├── LICENSE ├── Leetcode contests ├── 01-Biweekly Contest 110 │ ├── 1-Account_balance_after_rounded_purchase.cpp │ ├── 2-Insert_greatest_common_divisors_in_LL.cpp │ ├── 3-Min_seconds_to_equalize_circular_arr.cpp │ └── 4-Min_time_to_make_arr_sum_at_most_X.cpp ├── 02-Biweekly Contest 125 │ ├── 1-Min_operations_to_exceed_threshold-I.cpp │ ├── 2-Min_operations_to_exceed_threshold-II.cpp │ ├── 3-Count_pairs_of_connectable_servers.cpp │ └── 4-Find_max_sum_of_node_values.cpp ├── 03-Weekly contest 387 │ ├── 1-Distribute_elements_into_two_arr-I.cpp │ ├── 2-Count_submatrices_with_top-left_element.cpp │ ├── 3-Min_operations_to_write_letter_Y.cpp │ └── 4-Distribute_elements_into_two_arr-II.cpp ├── 04-Biweekly Contest 126 │ ├── 1-Find_sum_of_encrypted_int.cpp │ ├── 2-Mark_elements_on_arr_by_performing_queries.cpp │ ├── 3-Replace_question_marks_in_string.cpp │ └── 4-Find_sum_of_power_of_all_subsequences.cpp ├── 05-Weekly Contest 390 │ ├── 1-Max_length_substring_with_two_occurrences.cpp │ ├── 2-Apply_operations_to_make_sum_greater_than_k.cpp │ ├── 3-Most_frequent_ID.cpp │ └── 4-Longest_common_suffix_query.cpp ├── 06-Biweekly Contest 130 │ ├── 1-Check_if_grid_satisfies_conditions.cpp │ ├── 2-Max_points_inside_square.cpp │ ├── 3-Min_substring_partition_of_equal_character_freq.cpp │ └── 4-Find_products_of_elements_of_big_arr.cpp ├── 07-Weekly Contest 397 │ ├── 1-Permutation_difference_two_strings.cpp │ ├── 2-Max_energy_from_dragon.cpp │ ├── 3-Max_diff_score_in_grid.cpp │ └── 4-Find_min_cost_array_permutation.cpp ├── 08-Biweekly Contest 131 │ ├── 1-Find_XOR_of_nums.cpp │ ├── 2-Find_occurrence_of_element_in_arr.cpp │ ├── 3-Find_num_of_distinct_colors.cpp │ └── 4-Block_placement_queries.cpp ├── 09-Weekly Contest 399 │ ├── 1-Find_num_of_good_pairs-I.cpp │ ├── 2-String_compression_III.cpp │ ├── 3-Find_num_of_good_pairs-II.cpp │ └── 4-Max_sum_of_subsequence.cpp ├── 10-Weekly Contest 400 │ ├── 1-Min_num_of_chairs_in_waiting_room.cpp │ ├── 2-Count_days_without_meetings.cpp │ ├── 3-Lexicographically_min_string.cpp │ └── 4-Find_subarray_with_bitwise_OR.cpp ├── 11-Weekly Contest 401 │ ├── 1-Find_child_who_has_ball_after_K_seconds.cpp │ ├── 2-Find_Nth_value_after_K_seconds.cpp │ ├── 3-Max_total_reward_using_operations-I.cpp │ └── 4-Max_total_reward_using_operations-II.cpp └── 12-Biweekly Contest 132 │ ├── 1-Clear_digits.cpp │ ├── 2-Find_first_player_to_win_K_games.cpp │ ├── 3-Find_max_length_of_good_subsequence-I.cpp │ └── 4-Find_max_length_of_good_subsequence-II.cpp └── README.md /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "windows-gcc-x86", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "compilerPath": "C:/MinGW64/bin/gcc.exe", 9 | "cStandard": "${default}", 10 | "cppStandard": "${default}", 11 | "intelliSenseMode": "windows-gcc-x86", 12 | "compilerArgs": [ 13 | "" 14 | ] 15 | } 16 | ], 17 | "version": 4 18 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "C/C++ Runner: Debug Session", 6 | "type": "cppdbg", 7 | "request": "launch", 8 | "args": [], 9 | "stopAtEntry": false, 10 | "externalConsole": true, 11 | "cwd": ".", 12 | "program": "build/Debug/outDebug", 13 | "MIMode": "gdb", 14 | "miDebuggerPath": "gdb", 15 | "setupCommands": [ 16 | { 17 | "description": "Enable pretty-printing for gdb", 18 | "text": "-enable-pretty-printing", 19 | "ignoreFailures": true 20 | } 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "C_Cpp_Runner.cCompilerPath": "gcc", 3 | "C_Cpp_Runner.cppCompilerPath": "g++", 4 | "C_Cpp_Runner.debuggerPath": "gdb", 5 | "C_Cpp_Runner.cStandard": "", 6 | "C_Cpp_Runner.cppStandard": "", 7 | "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", 8 | "C_Cpp_Runner.useMsvc": false, 9 | "C_Cpp_Runner.warnings": [ 10 | "-Wall", 11 | "-Wextra", 12 | "-Wpedantic", 13 | "-Wshadow", 14 | "-Wformat=2", 15 | "-Wcast-align", 16 | "-Wconversion", 17 | "-Wsign-conversion", 18 | "-Wnull-dereference" 19 | ], 20 | "C_Cpp_Runner.msvcWarnings": [ 21 | "/W4", 22 | "/permissive-", 23 | "/w14242", 24 | "/w14287", 25 | "/w14296", 26 | "/w14311", 27 | "/w14826", 28 | "/w44062", 29 | "/w44242", 30 | "/w14905", 31 | "/w14906", 32 | "/w14263", 33 | "/w44265", 34 | "/w14928" 35 | ], 36 | "C_Cpp_Runner.enableWarnings": true, 37 | "C_Cpp_Runner.warningsAsError": false, 38 | "C_Cpp_Runner.compilerArgs": [], 39 | "C_Cpp_Runner.linkerArgs": [], 40 | "C_Cpp_Runner.includePaths": [], 41 | "C_Cpp_Runner.includeSearch": [ 42 | "*", 43 | "**/*" 44 | ], 45 | "C_Cpp_Runner.excludeSearch": [ 46 | "**/build", 47 | "**/build/**", 48 | "**/.*", 49 | "**/.*/**", 50 | "**/.vscode", 51 | "**/.vscode/**" 52 | ], 53 | "C_Cpp_Runner.useAddressSanitizer": false, 54 | "C_Cpp_Runner.useUndefinedSanitizer": false, 55 | "C_Cpp_Runner.useLeakSanitizer": false, 56 | "C_Cpp_Runner.showCompilationTime": false, 57 | "C_Cpp_Runner.useLinkTimeOptimization": false, 58 | "C_Cpp_Runner.msvcSecureNoWarnings": false 59 | } -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/1-Saving_tax.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/1-Saving_tax.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/10-Sum_of_range_distinct_queries.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/10-Sum_of_range_distinct_queries.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/2-Profit_increment.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/2-Profit_increment.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/3-Two_ranges.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/3-Two_ranges.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/4-Three_powers_of_two.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/4-Three_powers_of_two.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/5-Prefix_ones.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/5-Prefix_ones.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/6-Equal_hamming_distance.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/6-Equal_hamming_distance.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/7-Chef's_favourite_function.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/7-Chef's_favourite_function.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/8-Min_replacement.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/8-Min_replacement.cpp -------------------------------------------------------------------------------- /CodeChef contests/01-Starters 75 Division 4/9-XOR_X_get_max.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/01-Starters 75 Division 4/9-XOR_X_get_max.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/1-Tom_and_Jerry_chase.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/1-Tom_and_Jerry_chase.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/10-K_forests.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/10-K_forests.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/2-Cofechef_airlines.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/2-Cofechef_airlines.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/3-Tekken.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/3-Tekken.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/4-Concat_palindrome.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/4-Concat_palindrome.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/5-Three_numbers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/5-Three_numbers.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/6-Spreading_charges.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/6-Spreading_charges.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/7-K_increment_palindrome.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/7-K_increment_palindrome.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/8-Yet_another_XOR_sort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/8-Yet_another_XOR_sort.cpp -------------------------------------------------------------------------------- /CodeChef contests/02-Starters 77 Division 4/9-Sort_a_string.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/02-Starters 77 Division 4/9-Sort_a_string.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/1-Double_rent.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/1-Double_rent.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/10-Combinatorics_is_fun.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/10-Combinatorics_is_fun.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/2-Pizza_cutting.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/2-Pizza_cutting.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/3-Santa_and_chocolates.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/3-Santa_and_chocolates.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/4-GCD_and_LCM.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/4-GCD_and_LCM.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/5-Maximise_sum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/5-Maximise_sum.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/6-Lexicographically_largest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/6-Lexicographically_largest.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/7-Construct_an_array.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/7-Construct_an_array.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/8-Find_diameter.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/8-Find_diameter.cpp -------------------------------------------------------------------------------- /CodeChef contests/03-Starters 104 Division 4/9-Longest_non_decreasing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/03-Starters 104 Division 4/9-Longest_non_decreasing.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/1-Summer_time.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/1-Summer_time.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/2-Cricket_tournament.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/2-Cricket_tournament.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/3-Binary_parity.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/3-Binary_parity.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/4-Table_strength.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/4-Table_strength.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/5-Swap_and_unite.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/5-Swap_and_unite.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/6-Make_it_one.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/6-Make_it_one.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/7-How_many_arrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/7-How_many_arrays.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/8-It_is_tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/8-It_is_tree.cpp -------------------------------------------------------------------------------- /CodeChef contests/04-Starters 124 Division 4/9-Random_coloring.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/04-Starters 124 Division 4/9-Random_coloring.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/1-Remaining_neighborhoods.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/1-Remaining_neighborhoods.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/2-Gotta_catch_em_all.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/2-Gotta_catch_em_all.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/3-Dice_deception.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/3-Dice_deception.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/4-K_closeness.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/4-K_closeness.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/5-Encrypt_value.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/5-Encrypt_value.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/6-T_perm.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/6-T_perm.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/7-Digit_space.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/7-Digit_space.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/8-ABC_conjecture-II.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/8-ABC_conjecture-II.cpp -------------------------------------------------------------------------------- /CodeChef contests/05-Starters 131 Division 4/9-Chef_needs_to_return_videotapes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/05-Starters 131 Division 4/9-Chef_needs_to_return_videotapes.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/1-Morning_run.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/1-Morning_run.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/2-Money_double.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/2-Money_double.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/3-Rock_paper_scissors.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/3-Rock_paper_scissors.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/4-Origin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/4-Origin.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/5-3out1in.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/5-3out1in.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/6-Prison_escape.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/6-Prison_escape.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/7-Chef_and_bit_tree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/7-Chef_and_bit_tree.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/8-Permutation_cycle_queries.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/8-Permutation_cycle_queries.cpp -------------------------------------------------------------------------------- /CodeChef contests/06-Starters 134 Division 4/9-Count_good_RBS.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/06-Starters 134 Division 4/9-Count_good_RBS.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/1-Football_ties.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/1-Football_ties.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/2-Invert_and_equalize.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/2-Invert_and_equalize.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/3-Change_A_to_B.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/3-Change_A_to_B.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/4-Graph_cost.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/4-Graph_cost.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/5-Limit_of_MEX.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/5-Limit_of_MEX.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/6-Envious_pile.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/6-Envious_pile.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/7-Milky_dark_chocolates.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/7-Milky_dark_chocolates.cpp -------------------------------------------------------------------------------- /CodeChef contests/07-Starters 135 Division 3/8-RCB_vs_CSK.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/07-Starters 135 Division 3/8-RCB_vs_CSK.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/1-Even_sum_subarray.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/1-Even_sum_subarray.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/2-My_first_geometry_problem.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/2-My_first_geometry_problem.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/3-Sum_of_modes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/3-Sum_of_modes.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/4-Sum_of_max_K_subarray.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/4-Sum_of_max_K_subarray.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/5-Lexicographically_maximal_prefix_AND.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/5-Lexicographically_maximal_prefix_AND.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/6-Non-zero_XOR.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/6-Non-zero_XOR.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/7-Game_on_rectangle.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/7-Game_on_rectangle.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/8-Who_makes_P1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/8-Who_makes_P1.cpp -------------------------------------------------------------------------------- /CodeChef contests/08-Starters 136 Division 3/9-Min_segments.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/08-Starters 136 Division 3/9-Min_segments.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/1-Spell_splice.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/1-Spell_splice.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/2-Large_differences.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/2-Large_differences.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/3-Double_trouble.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/3-Double_trouble.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/4-Speedrun.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/4-Speedrun.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/5-Unusual_queries.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/5-Unusual_queries.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/6-Coprime_subarrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/6-Coprime_subarrays.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/7-Concat_lexman_substrs.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/7-Concat_lexman_substrs.cpp -------------------------------------------------------------------------------- /CodeChef contests/09-Starters 137 Division 3/8-Election_hopes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/CodeChef contests/09-Starters 137 Division 3/8-Election_hopes.cpp -------------------------------------------------------------------------------- /Codeforces contests/01-Codeforces Round 918 (Div. 4)/1-Odd_one_out.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/01-Codeforces Round 918 (Div. 4)/1-Odd_one_out.cpp -------------------------------------------------------------------------------- /Codeforces contests/01-Codeforces Round 918 (Div. 4)/2-Not_quite_latin_square.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/01-Codeforces Round 918 (Div. 4)/2-Not_quite_latin_square.cpp -------------------------------------------------------------------------------- /Codeforces contests/01-Codeforces Round 918 (Div. 4)/3-Can_I_square.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/01-Codeforces Round 918 (Div. 4)/3-Can_I_square.cpp -------------------------------------------------------------------------------- /Codeforces contests/01-Codeforces Round 918 (Div. 4)/4-Unnatural_language_processing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/01-Codeforces Round 918 (Div. 4)/4-Unnatural_language_processing.cpp -------------------------------------------------------------------------------- /Codeforces contests/01-Codeforces Round 918 (Div. 4)/5-Romantic_glasses.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/01-Codeforces Round 918 (Div. 4)/5-Romantic_glasses.cpp -------------------------------------------------------------------------------- /Codeforces contests/01-Codeforces Round 918 (Div. 4)/6-Greetings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/01-Codeforces Round 918 (Div. 4)/6-Greetings.cpp -------------------------------------------------------------------------------- /Codeforces contests/01-Codeforces Round 918 (Div. 4)/7-Bicycles.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/01-Codeforces Round 918 (Div. 4)/7-Bicycles.cpp -------------------------------------------------------------------------------- /Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/1-Verify_password.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/1-Verify_password.cpp -------------------------------------------------------------------------------- /Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/2-Increase_decrease_copy.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/2-Increase_decrease_copy.cpp -------------------------------------------------------------------------------- /Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/3-Job_interview.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/3-Job_interview.cpp -------------------------------------------------------------------------------- /Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/4-Invertible_bracket_subsequences.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/4-Invertible_bracket_subsequences.cpp -------------------------------------------------------------------------------- /Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/5-Splittable_permutations.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/5-Splittable_permutations.cpp -------------------------------------------------------------------------------- /Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/6-Remove_bridges.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Codeforces contests/02-Educational Codeforces Round 166 (Rated for Div. 2)/6-Remove_bridges.cpp -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2024, Sarthak Sachdev 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /Leetcode contests/01-Biweekly Contest 110/1-Account_balance_after_rounded_purchase.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(int argc, char const *argv[]) 5 | { 6 | int purchaseAmount = 0; 7 | cin >> purchaseAmount; 8 | if ((purchaseAmount % 10) >= 5) 9 | purchaseAmount = purchaseAmount - purchaseAmount % 10 + 10; 10 | 11 | else 12 | purchaseAmount = purchaseAmount - (purchaseAmount % 10); 13 | 14 | cout << 100 - purchaseAmount << endl; 15 | return 0; 16 | } -------------------------------------------------------------------------------- /Leetcode contests/01-Biweekly Contest 110/2-Insert_greatest_common_divisors_in_LL.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | struct ListNode 7 | { 8 | int val; 9 | ListNode *next; 10 | ListNode() : val(0), next(nullptr) {} 11 | ListNode(int x) : val(x), next(nullptr) {} 12 | ListNode(int x, ListNode *next) : val(x), next(next) {} 13 | }; 14 | 15 | ListNode *insertGreatestCommonDivisors(ListNode *head) 16 | { 17 | if (!head || !(head->next)) 18 | return head; 19 | 20 | ListNode *curr = new ListNode(head->val); 21 | curr = head; 22 | 23 | while (curr->next) 24 | { 25 | int ans = __gcd(curr->val, curr->next->val); 26 | ListNode *temp = new ListNode(ans); 27 | temp->next = curr->next; 28 | curr->next = temp; 29 | curr = temp->next; 30 | } 31 | return head; 32 | } 33 | 34 | int main(int argc, char const *argv[]) 35 | { 36 | ListNode* head; 37 | head = insertGreatestCommonDivisors(head); 38 | return 0; 39 | } -------------------------------------------------------------------------------- /Leetcode contests/01-Biweekly Contest 110/3-Min_seconds_to_equalize_circular_arr.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | int minimumSeconds(vector &nums) 9 | { 10 | unordered_map> mp; 11 | for (int i = 0; i < nums.size(); i++) 12 | mp[nums[i]].push_back(i); 13 | 14 | int ans = nums.size(), x = 0; 15 | 16 | for (auto &k : mp) 17 | { 18 | x = k.second[0]; 19 | int y = nums.size() - k.second.back() - 1; 20 | x += y; 21 | x = (x + 1) / 2; 22 | for (int i = 0; i < k.second.size() - 1; i++) 23 | x = max(x, (k.second[i + 1] - k.second[i]) / 2); 24 | ans = min(ans, x); 25 | } 26 | 27 | return ans; 28 | } 29 | 30 | int main(int argc, char const *argv[]) 31 | { 32 | vector nums = {2, 4, 6, 23, 34, 12, 233, 45553, 45795}; 33 | int sec = minimumSeconds(nums); 34 | cout << sec << endl; 35 | return 0; 36 | } -------------------------------------------------------------------------------- /Leetcode contests/01-Biweekly Contest 110/4-Min_time_to_make_arr_sum_at_most_X.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | int main(int argc, char const *argv[]) 5 | { 6 | 7 | return 0; 8 | } -------------------------------------------------------------------------------- /Leetcode contests/02-Biweekly Contest 125/1-Min_operations_to_exceed_threshold-I.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/02-Biweekly Contest 125/1-Min_operations_to_exceed_threshold-I.cpp -------------------------------------------------------------------------------- /Leetcode contests/02-Biweekly Contest 125/2-Min_operations_to_exceed_threshold-II.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/02-Biweekly Contest 125/2-Min_operations_to_exceed_threshold-II.cpp -------------------------------------------------------------------------------- /Leetcode contests/02-Biweekly Contest 125/3-Count_pairs_of_connectable_servers.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/02-Biweekly Contest 125/3-Count_pairs_of_connectable_servers.cpp -------------------------------------------------------------------------------- /Leetcode contests/02-Biweekly Contest 125/4-Find_max_sum_of_node_values.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/02-Biweekly Contest 125/4-Find_max_sum_of_node_values.cpp -------------------------------------------------------------------------------- /Leetcode contests/03-Weekly contest 387/1-Distribute_elements_into_two_arr-I.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/03-Weekly contest 387/1-Distribute_elements_into_two_arr-I.cpp -------------------------------------------------------------------------------- /Leetcode contests/03-Weekly contest 387/2-Count_submatrices_with_top-left_element.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/03-Weekly contest 387/2-Count_submatrices_with_top-left_element.cpp -------------------------------------------------------------------------------- /Leetcode contests/03-Weekly contest 387/3-Min_operations_to_write_letter_Y.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/03-Weekly contest 387/3-Min_operations_to_write_letter_Y.cpp -------------------------------------------------------------------------------- /Leetcode contests/03-Weekly contest 387/4-Distribute_elements_into_two_arr-II.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/03-Weekly contest 387/4-Distribute_elements_into_two_arr-II.cpp -------------------------------------------------------------------------------- /Leetcode contests/04-Biweekly Contest 126/1-Find_sum_of_encrypted_int.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/04-Biweekly Contest 126/1-Find_sum_of_encrypted_int.cpp -------------------------------------------------------------------------------- /Leetcode contests/04-Biweekly Contest 126/2-Mark_elements_on_arr_by_performing_queries.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/04-Biweekly Contest 126/2-Mark_elements_on_arr_by_performing_queries.cpp -------------------------------------------------------------------------------- /Leetcode contests/04-Biweekly Contest 126/3-Replace_question_marks_in_string.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/04-Biweekly Contest 126/3-Replace_question_marks_in_string.cpp -------------------------------------------------------------------------------- /Leetcode contests/04-Biweekly Contest 126/4-Find_sum_of_power_of_all_subsequences.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/04-Biweekly Contest 126/4-Find_sum_of_power_of_all_subsequences.cpp -------------------------------------------------------------------------------- /Leetcode contests/05-Weekly Contest 390/1-Max_length_substring_with_two_occurrences.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/05-Weekly Contest 390/1-Max_length_substring_with_two_occurrences.cpp -------------------------------------------------------------------------------- /Leetcode contests/05-Weekly Contest 390/2-Apply_operations_to_make_sum_greater_than_k.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/05-Weekly Contest 390/2-Apply_operations_to_make_sum_greater_than_k.cpp -------------------------------------------------------------------------------- /Leetcode contests/05-Weekly Contest 390/3-Most_frequent_ID.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/05-Weekly Contest 390/3-Most_frequent_ID.cpp -------------------------------------------------------------------------------- /Leetcode contests/05-Weekly Contest 390/4-Longest_common_suffix_query.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/05-Weekly Contest 390/4-Longest_common_suffix_query.cpp -------------------------------------------------------------------------------- /Leetcode contests/06-Biweekly Contest 130/1-Check_if_grid_satisfies_conditions.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/06-Biweekly Contest 130/1-Check_if_grid_satisfies_conditions.cpp -------------------------------------------------------------------------------- /Leetcode contests/06-Biweekly Contest 130/2-Max_points_inside_square.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/06-Biweekly Contest 130/2-Max_points_inside_square.cpp -------------------------------------------------------------------------------- /Leetcode contests/06-Biweekly Contest 130/3-Min_substring_partition_of_equal_character_freq.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/06-Biweekly Contest 130/3-Min_substring_partition_of_equal_character_freq.cpp -------------------------------------------------------------------------------- /Leetcode contests/06-Biweekly Contest 130/4-Find_products_of_elements_of_big_arr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/06-Biweekly Contest 130/4-Find_products_of_elements_of_big_arr.cpp -------------------------------------------------------------------------------- /Leetcode contests/07-Weekly Contest 397/1-Permutation_difference_two_strings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/07-Weekly Contest 397/1-Permutation_difference_two_strings.cpp -------------------------------------------------------------------------------- /Leetcode contests/07-Weekly Contest 397/2-Max_energy_from_dragon.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/07-Weekly Contest 397/2-Max_energy_from_dragon.cpp -------------------------------------------------------------------------------- /Leetcode contests/07-Weekly Contest 397/3-Max_diff_score_in_grid.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/07-Weekly Contest 397/3-Max_diff_score_in_grid.cpp -------------------------------------------------------------------------------- /Leetcode contests/07-Weekly Contest 397/4-Find_min_cost_array_permutation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/07-Weekly Contest 397/4-Find_min_cost_array_permutation.cpp -------------------------------------------------------------------------------- /Leetcode contests/08-Biweekly Contest 131/1-Find_XOR_of_nums.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/08-Biweekly Contest 131/1-Find_XOR_of_nums.cpp -------------------------------------------------------------------------------- /Leetcode contests/08-Biweekly Contest 131/2-Find_occurrence_of_element_in_arr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/08-Biweekly Contest 131/2-Find_occurrence_of_element_in_arr.cpp -------------------------------------------------------------------------------- /Leetcode contests/08-Biweekly Contest 131/3-Find_num_of_distinct_colors.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/08-Biweekly Contest 131/3-Find_num_of_distinct_colors.cpp -------------------------------------------------------------------------------- /Leetcode contests/08-Biweekly Contest 131/4-Block_placement_queries.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/08-Biweekly Contest 131/4-Block_placement_queries.cpp -------------------------------------------------------------------------------- /Leetcode contests/09-Weekly Contest 399/1-Find_num_of_good_pairs-I.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/09-Weekly Contest 399/1-Find_num_of_good_pairs-I.cpp -------------------------------------------------------------------------------- /Leetcode contests/09-Weekly Contest 399/2-String_compression_III.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/09-Weekly Contest 399/2-String_compression_III.cpp -------------------------------------------------------------------------------- /Leetcode contests/09-Weekly Contest 399/3-Find_num_of_good_pairs-II.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/09-Weekly Contest 399/3-Find_num_of_good_pairs-II.cpp -------------------------------------------------------------------------------- /Leetcode contests/09-Weekly Contest 399/4-Max_sum_of_subsequence.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/09-Weekly Contest 399/4-Max_sum_of_subsequence.cpp -------------------------------------------------------------------------------- /Leetcode contests/10-Weekly Contest 400/1-Min_num_of_chairs_in_waiting_room.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/10-Weekly Contest 400/1-Min_num_of_chairs_in_waiting_room.cpp -------------------------------------------------------------------------------- /Leetcode contests/10-Weekly Contest 400/2-Count_days_without_meetings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/10-Weekly Contest 400/2-Count_days_without_meetings.cpp -------------------------------------------------------------------------------- /Leetcode contests/10-Weekly Contest 400/3-Lexicographically_min_string.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/10-Weekly Contest 400/3-Lexicographically_min_string.cpp -------------------------------------------------------------------------------- /Leetcode contests/10-Weekly Contest 400/4-Find_subarray_with_bitwise_OR.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/10-Weekly Contest 400/4-Find_subarray_with_bitwise_OR.cpp -------------------------------------------------------------------------------- /Leetcode contests/11-Weekly Contest 401/1-Find_child_who_has_ball_after_K_seconds.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/11-Weekly Contest 401/1-Find_child_who_has_ball_after_K_seconds.cpp -------------------------------------------------------------------------------- /Leetcode contests/11-Weekly Contest 401/2-Find_Nth_value_after_K_seconds.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/11-Weekly Contest 401/2-Find_Nth_value_after_K_seconds.cpp -------------------------------------------------------------------------------- /Leetcode contests/11-Weekly Contest 401/3-Max_total_reward_using_operations-I.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/11-Weekly Contest 401/3-Max_total_reward_using_operations-I.cpp -------------------------------------------------------------------------------- /Leetcode contests/11-Weekly Contest 401/4-Max_total_reward_using_operations-II.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/11-Weekly Contest 401/4-Max_total_reward_using_operations-II.cpp -------------------------------------------------------------------------------- /Leetcode contests/12-Biweekly Contest 132/1-Clear_digits.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/12-Biweekly Contest 132/1-Clear_digits.cpp -------------------------------------------------------------------------------- /Leetcode contests/12-Biweekly Contest 132/2-Find_first_player_to_win_K_games.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/12-Biweekly Contest 132/2-Find_first_player_to_win_K_games.cpp -------------------------------------------------------------------------------- /Leetcode contests/12-Biweekly Contest 132/3-Find_max_length_of_good_subsequence-I.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/12-Biweekly Contest 132/3-Find_max_length_of_good_subsequence-I.cpp -------------------------------------------------------------------------------- /Leetcode contests/12-Biweekly Contest 132/4-Find_max_length_of_good_subsequence-II.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/next-step-for-interview-prep/Leetcode_Codeforces_CodeChef-contests-solutions/118eaaaf9990aff44662b1b2c003dff462d07137/Leetcode contests/12-Biweekly Contest 132/4-Find_max_length_of_good_subsequence-II.cpp -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Competitive Programming Solutions 💻 2 | 3 | ## Welcome! 👋 4 | 5 | This repository contains my personal solutions to problems from **LeetCode**, **Codeforces**, and **CodeChef** contests. Here, you will find solutions that I submitted during the contests as well as additional problems solved afterward as part of my upsolving practice. 6 | 7 | ## Table of Contents 📚 8 | 9 | - [Overview](#overview) 🌐 10 | - [Platforms](#platforms) 🔗 11 | - [Folder Structure](#folder-structure) 🗂️ 12 | - [How to Use](#how-to-use) 📝 13 | - [Contributing](#contributing) 🤝 14 | - [License](#license) 📃 15 | 16 | ## Overview 🌟 17 | 18 | Competitive programming is an excellent way to enhance problem-solving skills and improve coding proficiency. This repository showcases my journey and growth through contests and practice problems from popular competitive programming platforms. 19 | 20 | ## Platforms 🔗 21 | 22 | The solutions are categorized based on the platforms: 23 | 24 | - **LeetCode**: Focuses on various data structures, algorithms, and problem-solving patterns. 25 | - **Codeforces**: Features a mix of challenging problems, suitable for practicing speed and precision. 26 | - **CodeChef**: Provides monthly contests and a wide range of practice problems for honing skills. 27 | 28 | ## Folder Structure 📂 29 | 30 | ``` 31 | /root-directory 32 | |-- leetcode/ # Solutions for LeetCode problems 33 | | |-- problem-name-or-id/ # Each problem has its own folder 34 | | | |-- solution.cpp # Solution file (C++) 35 | |-- codeforces/ # Solutions for Codeforces contests 36 | | |-- contest-id/ # Contest folders based on contest ID 37 | | | |-- problem-A.cpp # Problem A solution 38 | | | |-- problem-B.cpp # Problem B solution 39 | |-- codechef/ # Solutions for CodeChef contests 40 | | |-- contest-name/ # Contest folder based on name (e.g., START, COOKOFF) 41 | | | |-- problem-id.cpp # Problem solution file 42 | |-- README.md # Project README file 43 | ``` 44 | 45 | ## How to Use 📝 46 | 47 | 1. Clone this repository to your local machine: 48 | ```bash 49 | git clone https://github.com/yourusername/competitive-programming-solutions.git 50 | ``` 51 | 52 | 2. Navigate to the desired platform folder and locate the problem you need: 53 | ```bash 54 | cd leetcode/problem-name-or-id 55 | ``` 56 | 57 | 3. Open the solution file in your preferred code editor. 58 | 59 | 4. Run the code using your local compiler or an online IDE for testing. 60 | 61 | ## Contributing 🤝 62 | 63 | Contributions are welcome! If you have a more efficient solution or additional test cases for any problem, feel free to fork this repository, make your changes, and submit a pull request. 64 | 65 | ## License 📃 66 | 67 | This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details. 68 | 69 | **Happy Coding!** 😊🚀 70 | --------------------------------------------------------------------------------