Solving algorithmic problems on leetcode.com
- 1. Two Sum >>> two_sum.py
- 2. Add Two Numbers >>> linked_list_cycle.py
- 3. Longest Substring Without Repeating Characters >>> longest_substring_without_repeating_characters.py
- 4. Median of Two Sorted Arrays >>> median_of_two_sorted_arrays.py
- 5. Longest Palindromic Substring >>> longest_palindromic_substring.py
- 7. Reverse Integer >>> reverse_integer.py
- 9. Palindrome Number >>> palindrome_number.py
- 11. Container With Most Water >>> container_with_most_water.py
- 14. Longest Common Prefix >>> common_prefix.py
- 15. 3Sum >>> three_sum.py
- 18. 4Sum >>> four_sum.py
- 20. Valid Parentheses >>> valid_parentheses.py
- 22. Generate Parentheses >>> generating_correct_bracket_sequences.py
- 23. Merge k Sorted Lists >>> merging_k_sorted_lists.py
- 33. Search in Rotated Sorted Array >>> search_in_rotated_sorted_array.py
- 38. Count and Say >>> count_and_say.py
- 42. Trapping Rain Water >>> container_with_most_water.py
- 43. Multiply Strings >>> multiply_strings.py
- 49. Group Anagrams >>> valid_anagram.py
- 55. Jump Game >>> jump_game.py
- 56. Merge Intervals >>> merge_intervals.py
- 69. Sqrt(x) >>> sqrt_x.py
- 74. Search a 2D Matrix >>> binary_search.py
- 81. Search in Rotated Sorted Array II >>> search_in_rotated_sorted_array.py
- 100. Same Tree >>> same_tree.py
- 101. Symmetric Tree >>> same_tree.py
- 110. Balanced Binary Tree >>> same_tree.py
- 112. Path Sum >>> same_tree.py
- 113. Path Sum II >>> same_tree.py
- 121. Best Time to Buy and Sell Stock >>> best_time_to_buy_and_sell_stock.py
- 122. Best Time to Buy and Sell Stock II >>> best_time_to_buy_and_sell_stock.py
- 123. Best Time to Buy and Sell Stock III >>> best_time_to_buy_and_sell_stock.py
- 124. Binary Tree Maximum Path Sum >>> same_tree.py
- 128. Longest Consecutive Sequence >>> longest_consecutive_sequence.py
- 136. Single Number >>> single_number.py
- 137. Single Number II >>> single_number.py
- 141. Linked List Cycle >>> linked_list_cycle.py
- 142. Linked List Cycle II >>> linked_list_cycle.py
- 146. LRU Cache >>> lru_cache.py
- 153. Find Minimum in Rotated Sorted Array >>> search_in_rotated_sorted_array.py
- 167. Two Sum II - Input Array Is Sorted >>> two_sum.py
- 188. Best Time to Buy and Sell Stock IV >>> best_time_to_buy_and_sell_stock.py
- 200. Number of Islands >>> number_of_islands.py
- 202. Happy Number >>> sum_of_digits.py
- 204. Count Primes >>> count_primes.py
- 206. Reverse Linked List >>> linked_list_cycle.py
- 217. Contains Duplicate >>> contains_duplicate.py
- 219. Contains Duplicate II >>> contains_duplicate.py
- 220. Contains Duplicate III >>> contains_duplicate.py
- 239. Sliding Window Maximum >>> sliding_window_median.py
- 242. Valid Anagram >>> valid_anagram.py
- 258. Add Digits >>> alternating_digit_sum.py
- 298. Binary Tree Longest Consecutive Sequence >>> longest_consecutive_sequence.py
- 301. Remove Invalid Parentheses >>> remove_invalid_parentheses.py
- 305. Number of Islands II >>> number_of_islands.py
- 309. Best Time to Buy and Sell Stock with Cooldown >>> best_time_to_buy_and_sell_stock.py
- 347. Top K Frequent Elements >>> top_k_frequent_words.py
- 357. Count Numbers with Unique Digits >>> count_special_integers.py
- 365. Water and Jug Problem >>> water_and_jug_problem.py
- 374. Guess Number Higher or Lower >>> guess_number_higher_or_lower.py
- 387. First Unique Character in a String >>> first_unique_character.py
- 424. Longest Repeating Character Replacement >>> longest_repeating_character_replacement.py
- 438. Find All Anagrams in a String >>> valid_anagram.py
- 480. Sliding Window Median >>> sliding_window_median.py
- 485. Max Consecutive Ones >>> binary_vector.py
- 487. Max Consecutive Ones II >>> max_consecutive_ones.rb
- 531. Lonely Pixel I >>> lonely_pixel.py
- 532. K-diff Pairs in an Array >>> count_number_of_pairs_with_absolute_difference_k.py
- 533. Lonely Pixel II >>> lonely_pixel.py
- 539. Minimum Time Difference >>> minimum_time_difference.py
- 549. Binary Tree Longest Consecutive Sequence II >>> binary_tree_longest_consecutive_sequence.py
- 681. Next Closest Time >>> minimum_time_difference.py
- 692. Top K Frequent Words >>> top_k_frequent_words.py
- 704. Binary Search >>> binary_search.py
- 714. Best Time to Buy and Sell Stock with Transaction Fee >>> best_time_to_buy_and_sell_stock.py
- 718. Maximum Length of Repeated Subarray >>> maximum_length_of_repeated_subarray.py
- 719. Find K-th Smallest Pair Distance >>> find_k_th_smallest_pair_distance.py
- 720. Longest Word in Dictionary >>> longest_word_in_dictionary.py
- 721. Accounts Merge >>> accounts_merge.py
- 743. Network Delay Time >>> network_delay_time.py
- 760. Find Anagram Mappings >>> valid_anagram.py
- 763. Partition Labels >>> partition_labels.py
- 849. Maximize Distance to Closest Person >>> free_seats_in_the_row.py
- 870. Advantage Shuffle >>> advantage_shuffle.py
- 949. Largest Time for Given Digits >>> largest_time_for_given_digits.py
- 977. Squares of a Sorted Array >>> squares_sorted_array.py
- 981. Time Based Key-Value Store >>> time_based_key_value_store.py
- 982. Triples with Bitwise AND Equal To Zero >>> triples_with_bitwise.py
- 983. Minimum Cost For Tickets >>> minimum_cost_for_tickets.py
- 1004. Max Consecutive Ones III >>> max_consecutive_ones.rb
- 1046. Last Stone Weight >>> last_stone_weight.py
- 1049. Last Stone Weight II >>> last_stone_weight.py
- 1109. Corporate Flight Bookings >>> corporate_flight_bookings.py
- 1189. Maximum Number of Balloons >>> maximum_number_of_balloons.py
- 1192. Critical Connections in a Network >>> critical_connections_in_a_network.py
- 1243. Array Transformation >>> array_transformation.py
- 1266. Minimum Time Visiting All Points >>> minimum_time_visiting_all_points.py
- 1347. Minimum Number of Steps to Make Two Strings Anagram >>> valid_anagram.py
- 1375. Number of Times Binary String Is Prefix-Aligned >>> number_of_times_binary_string.py
- 1376. Time Needed to Inform All Employees >>> time_needed_to_inform.py
- 1386. Cinema Seat Allocation >>> cinema_seat_allocation.py
- 1443. Minimum Time to Collect All Apples in a Tree >>> collect_all_apples_in_tree.py
- 1450. Number of Students Doing Homework at a Given Time >>> number_of_students_doing_homework_at_a_given_time.py
- 1451. Rearrange Words in a Sentence >>> rearrange_words_in_a_sentence.py
- 1480. Running Sum of 1d Array >>> running_sum.py
- 1528. Shuffle String >>> shuffle_string.py
- 1566. Detect Pattern of Length M Repeated K or More Times >>> detect_pattern.py
- 1578. Minimum Time to Make Rope Colorful >>> minimum_time_to_make_rope_colorful.py
- 1604. Alert Using Same Key-Card Three or More Times in a One Hour Period >>> alert_using_same_key_card.py
- 1700. Number of Students Unable to Eat Lunch >>> number_of_students_unable_to_eat_lunch.py
- 1701. Average Waiting Time >>> average_vaiting_time.py
- 1702. Maximum Binary String After Change >>> maximum_binary_string_after_change.py
- 1723. Find Minimum Time to Finish All Jobs >>> find_minimum_time_to_finish_all_jobs.py
- 1735. Count Ways to Make Array With Product >>> count_ways_to_make_array_with_product.py
- 1736. Latest Time by Replacing Hidden Digits >>> minimum_time_difference.py
- 1737. Change Minimum Characters to Satisfy One of Three Conditions >>> change_minimum_characters_to_satisfy_one_of_three_conditions.py
- 1742. Maximum Number of Balls in a Box >>> maximum_number_of_balls_in_a_box.py
- 1744. Can You Eat Your Favorite Candy on Your Favorite Day? >>> favorite_candy_on_favorite_day.py
- 1748. Sum of Unique Elements >>> rearrange_characters.py
- 1869. Longer Contiguous Segments of Ones than Zeros >>> longer_contiguous_segments_of_ones_than_zeros.py
- 1870. Minimum Speed to Arrive on Time >>> minimum_speed_to_arrive_on_time.py
- 1871. Jump Game VII >>> jump_game.py
- 1883. Minimum Skips to Arrive at Meeting On Time >>> minimum_skips_to_arrive_at_meeting_on_time.py
- 1884. Egg Drop With 2 Eggs and N Floors >>> egg_drop_with_2_eggs_and_n_floors.py
- 1928. Minimum Cost to Reach Destination in Time >>> minimum_cost_to_reach_destination_in_time.py
- 1929. Concatenation of Array >>> concatenation_of_array.py
- 1945. Sum of Digits of String After Convert >>> sum_of_digits.py
- 1955. Count Number of Special Subsequences >>> count_number_of_special_subsequences.py
- 1956. Minimum Time For K Virus Variants to Spread >>> minimum_time_for_k_virus_variants_to_spread.py
- 1957. Delete Characters to Make Fancy String >>> delete_characters_to_make_fancy_string.py
- 1958. Check if Move is Legal >>> check_if_move_is_legal.py
- 1974. Minimum Time to Type Word Using Special Typewriter >>> minimum_time_to_type_word_using_special_typewriter.py
- 1975. Maximum Matrix Sum >>> maximum_matrix_sum.py
- 1977. Number of Ways to Separate Numbers >>> number_ways_to_separate_numbers.py
- 2006. Count Number of Pairs With Absolute Difference K >>> count_number_of_pairs_with_absolute_difference_k.py
- 2073. Time Needed to Buy Tickets >>> time_needed_to_buy.py
- 2186. Minimum Number of Steps to Make Two Strings Anagram II >>> valid_anagram.py
- 2220. Minimum Bit Flips to Convert Number >>> minimum_bit_flips.py
- 2221. Find Triangular Sum of an Array >>> find_triangular_sum.py
- 2243. Calculate Digit Sum of a String >>> calculate_digit_sum_of_string.py
- 2273. Find Resultant Array After Removing Anagrams >>> valid_anagram.py
- 2285. Maximum Total Importance of Roads >>> maximum_total_importance.py
- 2287. Rearrange Characters to Make Target String >>> rearrange_characters.py
- 2309. Greatest English Letter in Upper and Lower Case >>> greatest_letter.py
- 2351. First Letter to Appear Twice >>> first_letter_to_appear_twice.py
- 2376. Count Special Integers >>> count_special_integers.py
- 2380. Time Needed to Rearrange a Binary String >>> time_needed_to_rearrange.py
- 2412. Minimum Money Required Before Transactions >>> minimum_money_required_before_transactions.py
- 2413. Smallest Even Multiple >>> smallest_even_multiple.py
- 2544. Alternating Digit Sum >>> alternating_digit_sum.py
- 2609. Find the Longest Balanced Substring of a Binary String >>> find_the_longest_balanced_substring_of_a_binary_string.py
- 2727. Is Object Empty >>> is_object_empty.py
- 2863. Maximum Length of Semi-Decreasing Subarrays >>> maximum_length_of_semi_decreasing_subarrays.py
- 2976. Minimum Cost to Convert String I >>> minimum_cost_to_convert_string.py
- 2977. Minimum Cost to Convert String II >>> minimum_cost_to_convert_string.py
- 3032. Count Numbers With Unique Digits II >>> count_special_integers.py
- 3043. Find the Length of the Longest Common Prefix >>> common_prefix.py
- 3083. Existence of a Substring in a String and Its Reverse >>> existence_substring_in_string.py
- 3123. Find Edges in Shortest Paths >>> find_edges_in_shortest_paths.py
- Find all sequences of Ones in a binary vector >>> binary_vector.py
- Find two numbers from the unsorted list in such that they add up to target >>> find_number_from_array_that_adds_up_to_given_number.py
- Output all the unique pairs from a numeric array >>> all_unique_pairs.py
- Just count all the unique pairs from the numeric array >>> all_unique_pairs.py
- a list of strings of a given length from the dictArray dictionary >>> longest_substring_without_repeating_characters.py
- the dictArray dictionary, filtered by line lengths >>> longest_substring_without_repeating_characters.py
- Take Pairs With Absolute Difference K >>> count_number_of_pairs_with_absolute_difference_k.py
- Matching strings up to letter permutation >>> matching_strings_up_to_letter_permutation.py
- Maximum Length of Semi-Increasing Subarrays >>> maximum_length_of_semi_decreasing_subarrays.py
Tasks: 159(+9) >>> Files: 117
$ git clone git@github.com:rubygitflow/leetcode_python.git && cd leetcode_python/
$ python3 minimum_time_difference.py
$ pytest -v test_full.py
or
$ pytest test_full.py