Solving algorithmic problems on leetcode.com
- 1. Two Sum >>> two_sum.rb
- 2. Add Two Numbers >>> linked_list_cycle.rb
- 3. Longest Substring Without Repeating Characters >>> longest_substring_without_repeating_characters.rb
- 4. Median of Two Sorted Arrays >>> median_of_two_sorted_arrays.rb
- 5. Longest Palindromic Substring >>> longest_palindromic_substring.rb
- 7. Reverse Integer >>> reverse_integer.rb
- 9. Palindrome Number >>> palindrome_number.rb
- 11. Container With Most Water >>> container_with_most_water.rb
- 14. Longest Common Prefix >>> common_prefix.rb
- 15. 3Sum >>> three_sum.rb
- 18. 4Sum >>> four_sum.rb
- 20. Valid Parentheses >>> valid_parentheses.rb
- 23. Merge k Sorted Lists >>> merging_k_sorted_lists.rb
- 33. Search in Rotated Sorted Array >>> search_in_rotated_sorted_array.rb
- 38. Count and Say >>> count_and_say.rb
- 42. Trapping Rain Water >>> container_with_most_water.rb
- 43. Multiply Strings >>> multiply_strings.rb
- 49. Group Anagrams >>> valid_anagram.rb
- 55. Jump Game >>> jump_game.rb
- 56. Merge Intervals >>> merge_intervals.rb
- 69. Sqrt(x) >>> sqrt_x.rb
- 74. Search a 2D Matrix >>> binary_search.rb
- 81. Search in Rotated Sorted Array II >>> search_in_rotated_sorted_array.rb
- 121. Best Time to Buy and Sell Stock >>> best_time_to_buy_and_sell_stock.rb
- 122. Best Time to Buy and Sell Stock II >>> best_time_to_buy_and_sell_stock.rb
- 123. Best Time to Buy and Sell Stock III >>> best_time_to_buy_and_sell_stock.rb
- 128. Longest Consecutive Sequence >>> longest_consecutive_sequence.rb
- 136. Single Number >>> single_number.rb
- 137. Single Number II >>> single_number.rb
- 146. LRU Cache >>> lru_cache.rb
- 153. Find Minimum in Rotated Sorted Array >>> search_in_rotated_sorted_array.rb
- 167. Two Sum II - Input Array Is Sorted >>> two_sum.rb
- 188. Best Time to Buy and Sell Stock IV >>> best_time_to_buy_and_sell_stock.rb
- 202. Happy Number >>> sum_of_digits.rb
- 204. Count Primes >>> count_primes.rb
- 217. Contains Duplicate >>> contains_duplicate.rb
- 219. Contains Duplicate II >>> contains_duplicate.rb
- 220. Contains Duplicate III >>> contains_duplicate.rb
- 239. Sliding Window Maximum >>> sliding_window_median.rb
- 242. Valid Anagram >>> valid_anagram.rb
- 258. Add Digits >>> alternating_digit_sum.rb
- 309. Best Time to Buy and Sell Stock with Cooldown >>> best_time_to_buy_and_sell_stock.rb
- 347. Top K Frequent Elements >>> top_k_frequent_words.rb
- 357. Count Numbers with Unique Digits >>> count_special_integers.rb
- 365. Water and Jug Problem >>> water_and_jug_problem.rb
- 387. First Unique Character in a String >>> first_unique_character.rb
- 438. Find All Anagrams in a String >>> valid_anagram.rb
- 480. Sliding Window Median >>> sliding_window_median.rb
- 532. K-diff Pairs in an Array >>> count_number_of_pairs_with_absolute_difference_k.rb
- 692. Top K Frequent Words >>> top_k_frequent_words.rb
- 704. Binary Search >>> binary_search.rb
- 714. Best Time to Buy and Sell Stock with Transaction Fee >>> best_time_to_buy_and_sell_stock.rb
- 760. Find Anagram Mappings >>> valid_anagram.rb
- 870. Advantage Shuffle >>> advantage_shuffle.rb
- 949. Largest Time for Given Digits >>> largest_time_for_given_digits.rb
- 977. Squares of a Sorted Array >>> squares_sorted_array.rb
- 981. Time Based Key-Value Store >>> time_based_key_value_store.rb
- 982. Triples with Bitwise AND Equal To Zero >>> triples_with_bitwise.rb
- 983. Minimum Cost For Tickets >>> minimum_cost_for_tickets.rb
- 1046. Last Stone Weight >>> last_stone_weight.rb
- 1049. Last Stone Weight II >>> last_stone_weight.rb
- 1109. Corporate Flight Bookings >>> corporate_flight_bookings.rb
- 1189. Maximum Number of Balloons >>> maximum_number_of_balloons.rb
- 1192. Critical Connections in a Network >>> critical_connections_in_a_network.rb
- 1243. Array Transformation >>> array_transformation.rb
- 1266. Minimum Time Visiting All Points >>> minimum_time_visiting_all_points.rb
- 1347. Minimum Number of Steps to Make Two Strings Anagram >>> valid_anagram.rb
- 1375. Number of Times Binary String Is Prefix-Aligned >>> number_of_times_binary_string.rb
- 1376. Time Needed to Inform All Employees >>> time_needed_to_inform.rb
- 1443. Minimum Time to Collect All Apples in a Tree >>> collect_all_apples_in_tree.rb
- 1450. Number of Students Doing Homework at a Given Time >>> number_of_students_doing_homework_at_a_given_time.rb
- 1451. Rearrange Words in a Sentence >>> rearrange_words_in_a_sentence.rb
- 1480. Running Sum of 1d Array >>> running_sum.rb
- 1528. Shuffle String >>> shuffle_string.rb
- 1566. Detect Pattern of Length M Repeated K or More Times >>> detect_pattern.rb
- 1578. Minimum Time to Make Rope Colorful >>> minimum_time_to_make_rope_colorful.rb
- 1604. Alert Using Same Key-Card Three or More Times in a One Hour Period >>> alert_using_same_key_card.rb
- 1700. Number of Students Unable to Eat Lunch >>> number_of_students_unable_to_eat_lunch.rb
- 1701. Average Waiting Time >>> average_vaiting_time.rb
- 1702. Maximum Binary String After Change >>> maximum_binary_string_after_change.rb
- 1723. Find Minimum Time to Finish All Jobs >>> find_minimum_time_to_finish_all_jobs.rb
- 1736. Latest Time by Replacing Hidden Digits >>> latest_time_by_replacing_hidden_digits.rb
- 1744. Can You Eat Your Favorite Candy on Your Favorite Day? >>> favorite_candy_on_favorite_day.rb
- 1748. Sum of Unique Elements >>> rearrange_characters.rb
- 1870. Minimum Speed to Arrive on Time >>> minimum_speed_to_arrive_on_time.rb
- 1871. Jump Game VII >>> jump_game.rb
- 1929. Concatenation of Array >>> concatenation_of_array.rb
- 1945. Sum of Digits of String After Convert >>> sum_of_digits.rb
- 1955. Count Number of Special Subsequences >>> count_number_of_special_subsequences.rb
- 1957. Delete Characters to Make Fancy String >>> delete_characters_to_make_fancy_string.rb
- 1958. Check if Move is Legal >>> check_if_move_is_legal.rb
- 1974. Minimum Time to Type Word Using Special Typewriter >>> minimum_time_to_type_word_using_special_typewriter.rb
- 1975. Maximum Matrix Sum >>> maximum_matrix_sum.rb
- 1977. Number of Ways to Separate Numbers >>> number_ways_to_separate_numbers.rb
- 2006. Count Number of Pairs With Absolute Difference K >>> count_number_of_pairs_with_absolute_difference_k.rb
- 2073. Time Needed to Buy Tickets >>> time_needed_to_buy.rb
- 2186. Minimum Number of Steps to Make Two Strings Anagram II >>> valid_anagram.rb
- 2220. Minimum Bit Flips to Convert Number >>> minimum_bit_flips.rb
- 2221. Find Triangular Sum of an Array >>> find_triangular_sum.rb
- 2243. Calculate Digit Sum of a String >>> calculate_digit_sum_of_string.rb
- 2273. Find Resultant Array After Removing Anagrams >>> valid_anagram.rb
- 2285. Maximum Total Importance of Roads >>> maximum_total_importance.rb
- 2287. Rearrange Characters to Make Target String >>> rearrange_characters.rb
- 2309. Greatest English Letter in Upper and Lower Case >>> greatest_letter.rb
- 2351. First Letter to Appear Twice >>> first_letter_to_appear_twice.rb
- 2376. Count Special Integers >>> count_special_integers.rb
- 2380. Time Needed to Rearrange a Binary String >>> time_needed_to_rearrange.rb
- 2412. Minimum Money Required Before Transactions >>> minimum_money_required_before_transactions.rb
- 2413. Smallest Even Multiple >>> smallest_even_multiple.rb
- 2544. Alternating Digit Sum >>> alternating_digit_sum.rb
- 2609. Find the Longest Balanced Substring of a Binary String >>> find_the_longest_balanced_substring_of_a_binary_string.rb
- 2626. Array Reduce Transformation >>> groupby_filter_map_reduce.rb
- 2631. Group By >>> groupby_filter_map_reduce.rb
- 2634. Filter Elements from Array >>> groupby_filter_map_reduce.rb
- 2635. Apply Transform Over Each Element in Array >>> groupby_filter_map_reduce.rb
- 2727. Is Object Empty >>> is_object_empty.rb
- 2863. Maximum Length of Semi-Decreasing Subarrays >>> maximum_length_of_semi_decreasing_subarrays.rb
- 2976. Minimum Cost to Convert String I >>> minimum_cost_to_convert_string.rb
- 2977. Minimum Cost to Convert String II >>> minimum_cost_to_convert_string.rb
- 3032. Count Numbers With Unique Digits II >>> count_special_integers.rb
- 3043. Find the Length of the Longest Common Prefix >>> common_prefix.rb
- 3083. Existence of a Substring in a String and Its Reverse >>> existence_substring_in_string.rb
- 3123. Find Edges in Shortest Paths >>> find_edges_in_shortest_paths.rb
- [Matching strings up to letter permutation] >>> matching_strings_up_to_letter_permutation.rb
- [Maximum Length of Semi-Increasing Subarrays] >>> maximum_length_of_semi_decreasing_subarrays.rb
- [a list of strings of a given length from the dict_array dictionary] >>> longest_substring_without_repeating_characters.rb
- [dict_array, filtered by the length of the string with unique values] >>> longest_substring_without_repeating_characters.rb
- [Find Maximum in Rotated Sorted Array] >>> search_in_rotated_sorted_array.rb
- [Remove all empty elements from a hash/dictionary/map] >>> remove_all_empty_elements.rb
- [How to transform a hash/dictionary/map] >>> how_to_transform_dictionary.rb
Tasks: 123(+7) >>> Files: 92
$ git clone git@github.com:rubygitflow/leetcode_ruby.git && cd leetcode_ruby/
$ bundle
$ ruby latest_time_by_replacing_hidden_digits.rb
$ ruby -Ilib:test test/full_test.rb -v TEST