From 7cf9719dc6dc6fa850824b702069c0f77a1e91ca Mon Sep 17 00:00:00 2001 From: Aaron <7063649+ahcode0919@users.noreply.github.com> Date: Sun, 2 Aug 2026 14:35:03 -0700 Subject: [PATCH] Migrate code to src folder and tests to tests folder --- CLAUDE.md | 15 ++++---- README.md | 34 +++++++++---------- .../algorithm_theory}/__init__.py | 0 .../algorithm_theory}/binary_search.py | 0 .../algorithm_theory}/bubble_sort.py | 0 .../algorithm_theory}/jump_search.py | 2 +- .../algorithm_theory}/linear_search.py | 0 {arrays => src/arrays}/__init__.py | 0 {arrays => src/arrays}/arrays_intersection.py | 0 {arrays => src/arrays}/check_double.py | 0 .../arrays}/container_with_max_area.py | 0 {arrays => src/arrays}/count_elements.py | 0 {arrays => src/arrays}/duplicate_zeros.py | 0 .../arrays}/find_disappeared_numbers.py | 0 .../arrays}/find_index_largest_number.py | 0 .../arrays}/find_max_consecutive_ones.py | 0 .../find_max_consecutive_ones_with_flip.py | 0 {arrays => src/arrays}/find_pivot_index.py | 0 .../arrays}/find_smallest_positive_integer.py | 0 {arrays => src/arrays}/first_duplicate.py | 0 .../arrays}/first_not_repeating_character.py | 0 .../arrays}/intersection_of_two_arrays_ii.py | 0 ...largest_number_at_least_twice_of_others.py | 0 .../arrays}/make_array_consecutive.py | 0 .../arrays}/max_consecutive_ones.py | 0 {arrays => src/arrays}/max_subarray.py | 0 {arrays => src/arrays}/merge_sorted_array.py | 0 .../arrays}/minimum_subarray_length.py | 0 {arrays => src/arrays}/missing_number.py | 0 {arrays => src/arrays}/move_zeros.py | 0 {arrays => src/arrays}/pascals_triangle_ii.py | 0 {arrays => src/arrays}/peaks.py | 0 {arrays => src/arrays}/plus_one.py | 0 {arrays => src/arrays}/remove_duplicates.py | 0 {arrays => src/arrays}/remove_element.py | 0 .../arrays}/replace_elements_with_greatest.py | 0 {arrays => src/arrays}/rotate_array.py | 0 {arrays => src/arrays}/single_number.py | 0 {arrays => src/arrays}/sort_by_parity.py | 0 {arrays => src/arrays}/sorted_squares.py | 0 {arrays => src/arrays}/third_max.py | 0 {arrays => src/arrays}/two_sum.py | 0 {arrays => src/arrays}/two_sum_ii.py | 0 .../arrays}/valid_mountain_array.py | 0 .../binary_search}/__init__.py | 0 .../binary_search}/search_insert_position.py | 0 {binary_tree => src/binary_tree}/__init__.py | 0 .../binary_tree}/binary_tree_path.py | 0 .../binary_tree}/even_odd_tree.py | 2 +- {binary_tree => src/binary_tree}/find_mode.py | 2 +- .../binary_tree}/has_path_sum.py | 2 +- .../binary_tree}/inorder_traversal.py | 2 +- .../binary_tree}/level_order_traversal.py | 2 +- {binary_tree => src/binary_tree}/max_depth.py | 2 +- {binary_tree => src/binary_tree}/min_depth.py | 2 +- .../binary_tree}/next_right_pointer.py | 0 .../binary_tree}/postorder_traversal.py | 2 +- .../binary_tree}/preorder_traversal.py | 2 +- .../binary_tree}/symmetric_binary_tree.py | 2 +- .../tree_from_inorder_postorder.py | 2 +- .../tree_from_preorder_inorder.py | 2 +- {binary_tree => src/binary_tree}/tree_node.py | 0 .../binary_tree}/two_sum_iv.py | 2 +- .../binary_tree}/valid_binary_search_tree.py | 2 +- .../circularly_linked_list}/__init__.py | 0 .../insert_cyclic_list.py | 2 +- .../data_structures}/__init__.py | 0 .../data_structures}/binary_tree.py | 2 +- .../data_structures}/binary_tree_node.py | 0 .../circularly_linked_list.py | 2 +- .../data_structures}/doubly_linked_list.py | 2 +- .../doubly_linked_list_node.py | 0 .../data_structures}/min_heap.py | 0 .../data_structures}/queues.py | 2 +- .../data_structures}/singly_linked_list.py | 2 +- .../singly_linked_list_node.py | 0 .../data_structures}/stack.py | 0 .../data_structures}/trie_with_array.py | 0 .../data_structures}/trie_with_dictionary.py | 0 .../trie_with_flat_dictionary.py | 0 .../doubly_linked_list}/__init__.py | 0 .../flatten_doubly_linked_lists.py | 0 {integers => src/integers}/__init__.py | 0 {integers => src/integers}/fibonacci.py | 0 .../integers}/palindrome_number.py | 0 {integers => src/integers}/reverse_number.py | 0 .../math_problems}/__init__.py | 0 .../math_problems}/count_primes.py | 0 .../math_problems}/fizz_buzz.py | 0 .../math_problems}/leap_year.py | 0 .../math_problems}/power_of_three.py | 0 .../multi_dimensional_arrays}/__init__.py | 0 .../diagonal_traverse.py | 0 .../pascals_triangle.py | 0 .../multi_dimensional_arrays}/rotate_image.py | 0 .../spiral_matrix.py | 0 {n_ary_tree => src/n_ary_tree}/__init__.py | 0 .../n_ary_tree}/encode_decode_tree.py | 4 +-- .../n_ary_tree}/level_order_traversal.py | 2 +- {n_ary_tree => src/n_ary_tree}/max_depth.py | 2 +- .../n_ary_tree}/nary_tree_node.py | 0 .../n_ary_tree}/postorder_traversal.py | 2 +- .../postorder_traversal_iterative.py | 2 +- .../n_ary_tree}/preorder_traversal.py | 2 +- .../preorder_traversal_iterative.py | 2 +- {queues => src/queues}/__init__.py | 0 {queues => src/queues}/moving_average.py | 0 {queues => src/queues}/queue_with_stack.py | 0 {queues => src/queues}/walls_and_gates.py | 0 .../singly_linked_lists}/__init__.py | 0 .../singly_linked_lists}/add_two_numbers.py | 2 +- .../copy_list_with_random_pointer.py | 0 .../singly_linked_lists}/delete_duplicates.py | 2 +- .../singly_linked_lists}/detect_cycle.py | 2 +- .../singly_linked_lists}/find_middle_node.py | 2 +- .../intersection_two_linked_lists.py | 2 +- .../intersection_two_linked_lists_with_set.py | 2 +- .../singly_linked_lists}/linked_list_cycle.py | 2 +- .../singly_linked_lists}/merge_k_lists.py | 2 +- .../merge_two_sorted_lists.py | 2 +- .../odd_even_linked_list.py | 2 +- .../palindrome_linked_list.py | 6 ++-- .../remove_linked_list_elements.py | 2 +- .../remove_nth_node_from_list.py | 2 +- .../reverse_linked_list.py | 2 +- .../reverse_linked_list_recursive.py | 2 +- .../singly_linked_lists}/rotate_list.py | 2 +- {stacks => src/stacks}/__init__.py | 0 {stacks => src/stacks}/daily_temperatures.py | 0 {stacks => src/stacks}/decode_string.py | 0 {stacks => src/stacks}/min_stack.py | 0 {stacks => src/stacks}/polish_notation.py | 0 {stacks => src/stacks}/roman_to_integer.py | 0 {stacks => src/stacks}/stack_with_queue.py | 0 {stacks => src/stacks}/valid_parentheses.py | 0 {strings => src/strings}/__init__.py | 0 {strings => src/strings}/add_binary.py | 0 {strings => src/strings}/anagram.py | 0 {strings => src/strings}/crop_string.py | 0 .../strings}/first_unique_character_in_str.py | 0 {strings => src/strings}/group_anagrams.py | 0 {strings => src/strings}/implement_str_str.py | 0 {strings => src/strings}/jewels_and_stones.py | 0 .../strings}/license_key_formatter.py | 0 .../strings}/longest_common_prefix.py | 0 .../longest_substring_without_duplicates.py | 0 {strings => src/strings}/multiply_strings.py | 0 {strings => src/strings}/palindrome.py | 0 .../strings}/palindrome_permutation.py | 0 {strings => src/strings}/pangram.py | 0 {strings => src/strings}/reverse_string.py | 0 {strings => src/strings}/reverse_words.py | 0 {strings => src/strings}/reverse_words_ii.py | 0 .../strings}/run_length_encoding.py | 0 {strings => src/strings}/string_to_integer.py | 0 .../strings}/string_to_integer_ii.py | 0 {strings => src/strings}/unique_emails.py | 0 .../strings}/valid_word_abbreviation.py | 0 {test_helpers => src/trie}/__init__.py | 0 {trie => src/trie}/map_sum.py | 0 {trie => src/trie}/replace_words.py | 0 tests/algorithm_theory/test_binary_search.py | 2 +- tests/algorithm_theory/test_bubble_sort.py | 2 +- tests/algorithm_theory/test_jump_search.py | 2 +- tests/algorithm_theory/test_linear_search.py | 2 +- tests/arrays/test_check_double.py | 2 +- tests/arrays/test_container_with_max_area.py | 2 +- tests/arrays/test_count_elements.py | 2 +- tests/arrays/test_duplicate_zeros.py | 2 +- tests/arrays/test_find_disappeared_numbers.py | 5 ++- .../arrays/test_find_index_largest_number.py | 2 +- .../arrays/test_find_max_consecutive_ones.py | 2 +- ...est_find_max_consecutive_ones_with_flip.py | 2 +- tests/arrays/test_find_pivot_index.py | 2 +- .../test_find_smallest_positive_integer.py | 2 +- tests/arrays/test_first_duplicate.py | 2 +- .../test_first_not_repeating_character.py | 2 +- .../test_intersection_of_two_arrays_ii.py | 2 +- .../arrays/test_intersection_three_arrays.py | 2 +- .../test_largest_number_twice_of_others.py | 2 +- tests/arrays/test_make_array_consecutive.py | 2 +- tests/arrays/test_max_consecutive_ones.py | 2 +- tests/arrays/test_max_subarray.py | 2 +- tests/arrays/test_merge_sorted_array.py | 2 +- tests/arrays/test_minimum_subarray_length.py | 2 +- tests/arrays/test_missing_number.py | 2 +- tests/arrays/test_move_zeros.py | 2 +- tests/arrays/test_pascals_triangle_ii.py | 2 +- tests/arrays/test_peaks.py | 2 +- tests/arrays/test_plus_one.py | 2 +- tests/arrays/test_remove_duplicates.py | 2 +- tests/arrays/test_remove_element.py | 2 +- .../test_replace_elements_with_greatest.py | 2 +- tests/arrays/test_rotate_array.py | 2 +- tests/arrays/test_single_number.py | 2 +- tests/arrays/test_sort_by_parity.py | 2 +- tests/arrays/test_sorted_squares.py | 2 +- tests/arrays/test_third_max.py | 2 +- tests/arrays/test_two_sum.py | 2 +- tests/arrays/test_two_sum_ii.py | 2 +- tests/arrays/test_valid_mountain_array.py | 2 +- .../test_search_insert_position.py | 2 +- tests/binary_tree/test_binary_tree_path.py | 2 +- tests/binary_tree/test_even_odd_tree.py | 4 +-- tests/binary_tree/test_find_mode.py | 4 +-- tests/binary_tree/test_has_path_sum.py | 6 ++-- tests/binary_tree/test_inorder_traversal.py | 4 +-- .../binary_tree/test_level_order_traversal.py | 4 +-- tests/binary_tree/test_max_depth.py | 4 +-- tests/binary_tree/test_min_depth.py | 4 +-- tests/binary_tree/test_next_right_pointer.py | 2 +- tests/binary_tree/test_postorder_traversal.py | 4 +-- tests/binary_tree/test_pre_order_traversal.py | 4 +-- .../binary_tree/test_symmetric_binary_tree.py | 4 +-- .../test_tree_from_inorder_postorder.py | 6 ++-- .../test_tree_from_preorder_inorder.py | 6 ++-- tests/binary_tree/test_two_sum_iv.py | 4 +-- .../test_valid_binary_search_tree.py | 4 +-- .../test_insert_cyclic_list.py | 6 ++-- tests/data_structures/test_binary_tree.py | 4 +-- .../data_structures/test_binary_tree_node.py | 2 +- .../test_circularly_linked_list.py | 4 +-- .../test_doubly_linked_list.py | 2 +- .../test_doubly_linked_list_node.py | 2 +- tests/data_structures/test_min_heap.py | 2 +- tests/data_structures/test_queue.py | 2 +- .../test_singly_linked_list.py | 2 +- .../test_singly_linked_list_node.py | 2 +- tests/data_structures/test_stack.py | 2 +- tests/data_structures/test_trie_with_array.py | 2 +- .../test_trie_with_dictionary.py | 2 +- .../test_trie_with_flat_dictionary.py | 2 +- .../test_flatten_doubly_linked_lists.py | 4 +-- tests/integers/test_fibonacci.py | 2 +- tests/integers/test_palindrome_number.py | 2 +- tests/integers/test_reverse_number.py | 2 +- tests/math_problems/test_count_primes.py | 2 +- tests/math_problems/test_fizz_buzz.py | 2 +- tests/math_problems/test_leap_year.py | 2 +- tests/math_problems/test_power_of_three.py | 2 +- .../test_diagonal_traverse.py | 2 +- .../test_pascals_triangle.py | 2 +- .../test_rotate_image.py | 2 +- .../test_spiral_matrix.py | 2 +- tests/n_ary_tree/test_encode_decode_tree.py | 4 +-- .../n_ary_tree/test_level_order_traversal.py | 4 +-- tests/n_ary_tree/test_max_depth.py | 4 +-- tests/n_ary_tree/test_nary_tree_node.py | 2 +- tests/n_ary_tree/test_postorder_traversal.py | 4 +-- .../test_postorder_traversal_iterative.py | 4 +-- tests/n_ary_tree/test_preorder_traversal.py | 4 +-- .../test_preorder_traversal_iterative.py | 4 +-- tests/queues/test_moving_average.py | 2 +- tests/queues/test_queue_with_stack.py | 2 +- tests/queues/test_walls_and_gates.py | 2 +- .../test_add_two_numbers.py | 6 ++-- .../test_copy_list_with_random_pointer.py | 2 +- .../test_delete_duplicates.py | 6 ++-- .../singly_linked_lists/test_detect_cycle.py | 4 +-- .../test_find_middle_node.py | 4 +-- .../test_intersection_two_linked_lists.py | 4 +-- ..._intersection_two_linked_lists_with_set.py | 4 +-- .../test_linked_list_cycle.py | 4 +-- .../singly_linked_lists/test_merge_k_lists.py | 4 +-- .../test_merge_two_sorted_lists.py | 6 ++-- .../test_odd_even_linked_list.py | 6 ++-- .../test_palindrome_linked_list.py | 4 +-- .../test_remove_linked_list_elements.py | 6 ++-- .../test_remove_nth_node_from_list.py | 4 +-- .../test_reverse_linked_list.py | 6 ++-- .../test_reverse_linked_list_recursive.py | 6 ++-- tests/singly_linked_lists/test_rotate_list.py | 6 ++-- tests/stacks/test_daily_temperatures.py | 2 +- tests/stacks/test_decode_string.py | 2 +- tests/stacks/test_min_stack.py | 2 +- tests/stacks/test_polish_notation.py | 2 +- tests/stacks/test_roman_to_integer.py | 2 +- tests/stacks/test_stack_with_queue.py | 2 +- tests/stacks/test_valid_parentheses.py | 2 +- tests/strings/palindrome_permutation.py | 2 +- tests/strings/test_add_binary.py | 2 +- tests/strings/test_anagram.py | 2 +- tests/strings/test_crop_string.py | 2 +- .../test_first_unique_character_in_str.py | 2 +- tests/strings/test_group_anagrams.py | 2 +- tests/strings/test_implement_str_str.py | 2 +- tests/strings/test_jewels_and_stones.py | 2 +- tests/strings/test_license_key_formatter.py | 2 +- tests/strings/test_longest_common_prefix.py | 2 +- ...st_longest_substring_without_duplicates.py | 2 +- tests/strings/test_multiply_strings.py | 2 +- tests/strings/test_palindrome.py | 2 +- tests/strings/test_pangram.py | 2 +- tests/strings/test_reverse_string.py | 2 +- tests/strings/test_reverse_words.py | 2 +- tests/strings/test_reverse_words_ii.py | 2 +- tests/strings/test_run_length_encoding.py | 2 +- tests/strings/test_string_to_integer.py | 2 +- tests/strings/test_string_to_integer_ii.py | 2 +- tests/strings/test_unique_emails.py | 2 +- tests/strings/test_valid_word_abbreviation.py | 2 +- {trie => tests/test_helpers}/__init__.py | 0 .../test_helpers}/test_helpers.py | 6 ++-- tests/trie/test_map_sum.py | 2 +- tests/trie/test_replace_words.py | 2 +- 305 files changed, 272 insertions(+), 270 deletions(-) rename {algorithm_theory => src/algorithm_theory}/__init__.py (100%) rename {algorithm_theory => src/algorithm_theory}/binary_search.py (100%) rename {algorithm_theory => src/algorithm_theory}/bubble_sort.py (100%) rename {algorithm_theory => src/algorithm_theory}/jump_search.py (96%) rename {algorithm_theory => src/algorithm_theory}/linear_search.py (100%) rename {arrays => src/arrays}/__init__.py (100%) rename {arrays => src/arrays}/arrays_intersection.py (100%) rename {arrays => src/arrays}/check_double.py (100%) rename {arrays => src/arrays}/container_with_max_area.py (100%) rename {arrays => src/arrays}/count_elements.py (100%) rename {arrays => src/arrays}/duplicate_zeros.py (100%) rename {arrays => src/arrays}/find_disappeared_numbers.py (100%) rename {arrays => src/arrays}/find_index_largest_number.py (100%) rename {arrays => src/arrays}/find_max_consecutive_ones.py (100%) rename {arrays => src/arrays}/find_max_consecutive_ones_with_flip.py (100%) rename {arrays => src/arrays}/find_pivot_index.py (100%) rename {arrays => src/arrays}/find_smallest_positive_integer.py (100%) rename {arrays => src/arrays}/first_duplicate.py (100%) rename {arrays => src/arrays}/first_not_repeating_character.py (100%) rename {arrays => src/arrays}/intersection_of_two_arrays_ii.py (100%) rename {arrays => src/arrays}/largest_number_at_least_twice_of_others.py (100%) rename {arrays => src/arrays}/make_array_consecutive.py (100%) rename {arrays => src/arrays}/max_consecutive_ones.py (100%) rename {arrays => src/arrays}/max_subarray.py (100%) rename {arrays => src/arrays}/merge_sorted_array.py (100%) rename {arrays => src/arrays}/minimum_subarray_length.py (100%) rename {arrays => src/arrays}/missing_number.py (100%) rename {arrays => src/arrays}/move_zeros.py (100%) rename {arrays => src/arrays}/pascals_triangle_ii.py (100%) rename {arrays => src/arrays}/peaks.py (100%) rename {arrays => src/arrays}/plus_one.py (100%) rename {arrays => src/arrays}/remove_duplicates.py (100%) rename {arrays => src/arrays}/remove_element.py (100%) rename {arrays => src/arrays}/replace_elements_with_greatest.py (100%) rename {arrays => src/arrays}/rotate_array.py (100%) rename {arrays => src/arrays}/single_number.py (100%) rename {arrays => src/arrays}/sort_by_parity.py (100%) rename {arrays => src/arrays}/sorted_squares.py (100%) rename {arrays => src/arrays}/third_max.py (100%) rename {arrays => src/arrays}/two_sum.py (100%) rename {arrays => src/arrays}/two_sum_ii.py (100%) rename {arrays => src/arrays}/valid_mountain_array.py (100%) rename {binary_search => src/binary_search}/__init__.py (100%) rename {binary_search => src/binary_search}/search_insert_position.py (100%) rename {binary_tree => src/binary_tree}/__init__.py (100%) rename {binary_tree => src/binary_tree}/binary_tree_path.py (100%) rename {binary_tree => src/binary_tree}/even_odd_tree.py (97%) rename {binary_tree => src/binary_tree}/find_mode.py (94%) rename {binary_tree => src/binary_tree}/has_path_sum.py (92%) rename {binary_tree => src/binary_tree}/inorder_traversal.py (95%) rename {binary_tree => src/binary_tree}/level_order_traversal.py (95%) rename {binary_tree => src/binary_tree}/max_depth.py (93%) rename {binary_tree => src/binary_tree}/min_depth.py (96%) rename {binary_tree => src/binary_tree}/next_right_pointer.py (100%) rename {binary_tree => src/binary_tree}/postorder_traversal.py (96%) rename {binary_tree => src/binary_tree}/preorder_traversal.py (97%) rename {binary_tree => src/binary_tree}/symmetric_binary_tree.py (96%) rename {binary_tree => src/binary_tree}/tree_from_inorder_postorder.py (95%) rename {binary_tree => src/binary_tree}/tree_from_preorder_inorder.py (96%) rename {binary_tree => src/binary_tree}/tree_node.py (100%) rename {binary_tree => src/binary_tree}/two_sum_iv.py (94%) rename {binary_tree => src/binary_tree}/valid_binary_search_tree.py (94%) rename {circularly_linked_list => src/circularly_linked_list}/__init__.py (100%) rename {circularly_linked_list => src/circularly_linked_list}/insert_cyclic_list.py (95%) rename {data_structures => src/data_structures}/__init__.py (100%) rename {data_structures => src/data_structures}/binary_tree.py (90%) rename {data_structures => src/data_structures}/binary_tree_node.py (100%) rename {data_structures => src/data_structures}/circularly_linked_list.py (97%) rename {data_structures => src/data_structures}/doubly_linked_list.py (97%) rename {data_structures => src/data_structures}/doubly_linked_list_node.py (100%) rename {data_structures => src/data_structures}/min_heap.py (100%) rename {data_structures => src/data_structures}/queues.py (97%) rename {data_structures => src/data_structures}/singly_linked_list.py (97%) rename {data_structures => src/data_structures}/singly_linked_list_node.py (100%) rename {data_structures => src/data_structures}/stack.py (100%) rename {data_structures => src/data_structures}/trie_with_array.py (100%) rename {data_structures => src/data_structures}/trie_with_dictionary.py (100%) rename {data_structures => src/data_structures}/trie_with_flat_dictionary.py (100%) rename {doubly_linked_list => src/doubly_linked_list}/__init__.py (100%) rename {doubly_linked_list => src/doubly_linked_list}/flatten_doubly_linked_lists.py (100%) rename {integers => src/integers}/__init__.py (100%) rename {integers => src/integers}/fibonacci.py (100%) rename {integers => src/integers}/palindrome_number.py (100%) rename {integers => src/integers}/reverse_number.py (100%) rename {math_problems => src/math_problems}/__init__.py (100%) rename {math_problems => src/math_problems}/count_primes.py (100%) rename {math_problems => src/math_problems}/fizz_buzz.py (100%) rename {math_problems => src/math_problems}/leap_year.py (100%) rename {math_problems => src/math_problems}/power_of_three.py (100%) rename {multi_dimensional_arrays => src/multi_dimensional_arrays}/__init__.py (100%) rename {multi_dimensional_arrays => src/multi_dimensional_arrays}/diagonal_traverse.py (100%) rename {multi_dimensional_arrays => src/multi_dimensional_arrays}/pascals_triangle.py (100%) rename {multi_dimensional_arrays => src/multi_dimensional_arrays}/rotate_image.py (100%) rename {multi_dimensional_arrays => src/multi_dimensional_arrays}/spiral_matrix.py (100%) rename {n_ary_tree => src/n_ary_tree}/__init__.py (100%) rename {n_ary_tree => src/n_ary_tree}/encode_decode_tree.py (93%) rename {n_ary_tree => src/n_ary_tree}/level_order_traversal.py (92%) rename {n_ary_tree => src/n_ary_tree}/max_depth.py (95%) rename {n_ary_tree => src/n_ary_tree}/nary_tree_node.py (100%) rename {n_ary_tree => src/n_ary_tree}/postorder_traversal.py (91%) rename {n_ary_tree => src/n_ary_tree}/postorder_traversal_iterative.py (92%) rename {n_ary_tree => src/n_ary_tree}/preorder_traversal.py (92%) rename {n_ary_tree => src/n_ary_tree}/preorder_traversal_iterative.py (91%) rename {queues => src/queues}/__init__.py (100%) rename {queues => src/queues}/moving_average.py (100%) rename {queues => src/queues}/queue_with_stack.py (100%) rename {queues => src/queues}/walls_and_gates.py (100%) rename {singly_linked_lists => src/singly_linked_lists}/__init__.py (100%) rename {singly_linked_lists => src/singly_linked_lists}/add_two_numbers.py (94%) rename {singly_linked_lists => src/singly_linked_lists}/copy_list_with_random_pointer.py (100%) rename {singly_linked_lists => src/singly_linked_lists}/delete_duplicates.py (87%) rename {singly_linked_lists => src/singly_linked_lists}/detect_cycle.py (94%) rename {singly_linked_lists => src/singly_linked_lists}/find_middle_node.py (87%) rename {singly_linked_lists => src/singly_linked_lists}/intersection_two_linked_lists.py (93%) rename {singly_linked_lists => src/singly_linked_lists}/intersection_two_linked_lists_with_set.py (93%) rename {singly_linked_lists => src/singly_linked_lists}/linked_list_cycle.py (94%) rename {singly_linked_lists => src/singly_linked_lists}/merge_k_lists.py (93%) rename {singly_linked_lists => src/singly_linked_lists}/merge_two_sorted_lists.py (92%) rename {singly_linked_lists => src/singly_linked_lists}/odd_even_linked_list.py (91%) rename {singly_linked_lists => src/singly_linked_lists}/palindrome_linked_list.py (81%) rename {singly_linked_lists => src/singly_linked_lists}/remove_linked_list_elements.py (91%) rename {singly_linked_lists => src/singly_linked_lists}/remove_nth_node_from_list.py (91%) rename {singly_linked_lists => src/singly_linked_lists}/reverse_linked_list.py (88%) rename {singly_linked_lists => src/singly_linked_lists}/reverse_linked_list_recursive.py (87%) rename {singly_linked_lists => src/singly_linked_lists}/rotate_list.py (90%) rename {stacks => src/stacks}/__init__.py (100%) rename {stacks => src/stacks}/daily_temperatures.py (100%) rename {stacks => src/stacks}/decode_string.py (100%) rename {stacks => src/stacks}/min_stack.py (100%) rename {stacks => src/stacks}/polish_notation.py (100%) rename {stacks => src/stacks}/roman_to_integer.py (100%) rename {stacks => src/stacks}/stack_with_queue.py (100%) rename {stacks => src/stacks}/valid_parentheses.py (100%) rename {strings => src/strings}/__init__.py (100%) rename {strings => src/strings}/add_binary.py (100%) rename {strings => src/strings}/anagram.py (100%) rename {strings => src/strings}/crop_string.py (100%) rename {strings => src/strings}/first_unique_character_in_str.py (100%) rename {strings => src/strings}/group_anagrams.py (100%) rename {strings => src/strings}/implement_str_str.py (100%) rename {strings => src/strings}/jewels_and_stones.py (100%) rename {strings => src/strings}/license_key_formatter.py (100%) rename {strings => src/strings}/longest_common_prefix.py (100%) rename {strings => src/strings}/longest_substring_without_duplicates.py (100%) rename {strings => src/strings}/multiply_strings.py (100%) rename {strings => src/strings}/palindrome.py (100%) rename {strings => src/strings}/palindrome_permutation.py (100%) rename {strings => src/strings}/pangram.py (100%) rename {strings => src/strings}/reverse_string.py (100%) rename {strings => src/strings}/reverse_words.py (100%) rename {strings => src/strings}/reverse_words_ii.py (100%) rename {strings => src/strings}/run_length_encoding.py (100%) rename {strings => src/strings}/string_to_integer.py (100%) rename {strings => src/strings}/string_to_integer_ii.py (100%) rename {strings => src/strings}/unique_emails.py (100%) rename {strings => src/strings}/valid_word_abbreviation.py (100%) rename {test_helpers => src/trie}/__init__.py (100%) rename {trie => src/trie}/map_sum.py (100%) rename {trie => src/trie}/replace_words.py (100%) rename {trie => tests/test_helpers}/__init__.py (100%) rename {test_helpers => tests/test_helpers}/test_helpers.py (93%) diff --git a/CLAUDE.md b/CLAUDE.md index 904f4e2..88db918 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,11 +19,10 @@ There is no separate build step; this is a pure Python (3.14+) library of algori ## Architecture -The repo is organized by topic into top-level directories, each containing implementation modules directly at the -top level (no `src/` layout). `pyproject.toml` sets `pythonpath = ["."]`, so both implementation and test code -import via the top-level package name, e.g. `from algorithm_theory.binary_search import binary_search_iterative`. +Algorithm code is stored in `/src`. `pyproject.toml` sets `pythonpath = ["."]`, so both + implementation and test code import via the top-level package name, e.g. `from src.algorithm_theory.binary_search import binary_search_iterative`. -Three categories of top-level directories, per the root `README.md`: +Three categories of top-level `/src` directories, per the root `README.md`: - **`algorithm_theory/`** — canonical/fundamental algorithm approaches (e.g. binary/jump/linear search, bubble sort). @@ -52,7 +51,7 @@ imported directly from their defining module rather than redefined per problem. ## Style -Ruff is configured in `pyproject.toml` (line length 100, target `py314`, rule sets `E, F, W, I, N, D`). Docstring -presence itself is not enforced (`D100-D107` ignored), but when docstrings are present their formatting is linted. -`tests/*` is exempt from docstring rules entirely. Solutions favor explicit, readable Python over terse one-liners -(stated explicitly in the root `README.md`). +- Solutions favor explicit, readable Python over complicated one-liners +- Ruff is configured in `pyproject.toml` (line length 100, target `py314`, rule sets `E, F, W, I, N, D`). + - Rules `D100-D107` are ignored + - `tests/*` is exempt from docstring rules entirely. diff --git a/README.md b/README.md index c0d3d5f..f940cc4 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,27 @@ # Python Data Structures and Algorithms ![](https://github.com/ahcode0919/python-ds-algorithms/actions/workflows/Python.yml/badge.svg?branch=main) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) Various Data Structures and Algorithm Solutions in Python (3.x). Succinct Python one-liners are avoided in most solutions -to prevent obscuring the function and logic of the algorithms / data-structures. +to prevent obscuring the function and logic of the algorithms / data-structures. -* [Algorithm Theory](algorithm_theory/) -* [Data Structures](data_structures/) +* [Algorithm Theory](src/algorithm_theory/) +* [Data Structures](src/data_structures/) ## Algorithms -* [Arrays](arrays/) -* [Binary Search](binary_search/) -* [Binary Tree](binary_tree/) -* [Circularly Linked Lists](circularly_linked_list/) -* [Doubly Linked Lists](doubly_linked_list/) -* [Integers](integers/) -* [Math Problems](math_problems/) -* [Matrices](multi_dimensional_arrays/) -* [N-ary Tree](n_ary_tree/) -* [Queues](queues/) -* [Singly Linked Lists](singly_linked_lists/) -* [Stacks](stacks/) -* [Strings](strings/) -* [Trie](trie/) +* [Arrays](src/arrays/) +* [Binary Search](src/binary_search/) +* [Binary Tree](src/binary_tree/) +* [Circularly Linked Lists](src/circularly_linked_list/) +* [Doubly Linked Lists](src/doubly_linked_list/) +* [Integers](src/integers/) +* [Math Problems](src/math_problems/) +* [Matrices](src/multi_dimensional_arrays/) +* [N-ary Tree](src/n_ary_tree/) +* [Queues](src/queues/) +* [Singly Linked Lists](src/singly_linked_lists/) +* [Stacks](src/stacks/) +* [Strings](src/strings/) +* [Trie](src/trie/) Each directory's problems and approaches are documented as doc comments directly in the corresponding `.py` files. diff --git a/algorithm_theory/__init__.py b/src/algorithm_theory/__init__.py similarity index 100% rename from algorithm_theory/__init__.py rename to src/algorithm_theory/__init__.py diff --git a/algorithm_theory/binary_search.py b/src/algorithm_theory/binary_search.py similarity index 100% rename from algorithm_theory/binary_search.py rename to src/algorithm_theory/binary_search.py diff --git a/algorithm_theory/bubble_sort.py b/src/algorithm_theory/bubble_sort.py similarity index 100% rename from algorithm_theory/bubble_sort.py rename to src/algorithm_theory/bubble_sort.py diff --git a/algorithm_theory/jump_search.py b/src/algorithm_theory/jump_search.py similarity index 96% rename from algorithm_theory/jump_search.py rename to src/algorithm_theory/jump_search.py index e69c0b7..2e3f318 100644 --- a/algorithm_theory/jump_search.py +++ b/src/algorithm_theory/jump_search.py @@ -1,6 +1,6 @@ import math -from algorithm_theory.linear_search import linear_search +from src.algorithm_theory.linear_search import linear_search def jump_search(array: list[int], target: int) -> int | None: diff --git a/algorithm_theory/linear_search.py b/src/algorithm_theory/linear_search.py similarity index 100% rename from algorithm_theory/linear_search.py rename to src/algorithm_theory/linear_search.py diff --git a/arrays/__init__.py b/src/arrays/__init__.py similarity index 100% rename from arrays/__init__.py rename to src/arrays/__init__.py diff --git a/arrays/arrays_intersection.py b/src/arrays/arrays_intersection.py similarity index 100% rename from arrays/arrays_intersection.py rename to src/arrays/arrays_intersection.py diff --git a/arrays/check_double.py b/src/arrays/check_double.py similarity index 100% rename from arrays/check_double.py rename to src/arrays/check_double.py diff --git a/arrays/container_with_max_area.py b/src/arrays/container_with_max_area.py similarity index 100% rename from arrays/container_with_max_area.py rename to src/arrays/container_with_max_area.py diff --git a/arrays/count_elements.py b/src/arrays/count_elements.py similarity index 100% rename from arrays/count_elements.py rename to src/arrays/count_elements.py diff --git a/arrays/duplicate_zeros.py b/src/arrays/duplicate_zeros.py similarity index 100% rename from arrays/duplicate_zeros.py rename to src/arrays/duplicate_zeros.py diff --git a/arrays/find_disappeared_numbers.py b/src/arrays/find_disappeared_numbers.py similarity index 100% rename from arrays/find_disappeared_numbers.py rename to src/arrays/find_disappeared_numbers.py diff --git a/arrays/find_index_largest_number.py b/src/arrays/find_index_largest_number.py similarity index 100% rename from arrays/find_index_largest_number.py rename to src/arrays/find_index_largest_number.py diff --git a/arrays/find_max_consecutive_ones.py b/src/arrays/find_max_consecutive_ones.py similarity index 100% rename from arrays/find_max_consecutive_ones.py rename to src/arrays/find_max_consecutive_ones.py diff --git a/arrays/find_max_consecutive_ones_with_flip.py b/src/arrays/find_max_consecutive_ones_with_flip.py similarity index 100% rename from arrays/find_max_consecutive_ones_with_flip.py rename to src/arrays/find_max_consecutive_ones_with_flip.py diff --git a/arrays/find_pivot_index.py b/src/arrays/find_pivot_index.py similarity index 100% rename from arrays/find_pivot_index.py rename to src/arrays/find_pivot_index.py diff --git a/arrays/find_smallest_positive_integer.py b/src/arrays/find_smallest_positive_integer.py similarity index 100% rename from arrays/find_smallest_positive_integer.py rename to src/arrays/find_smallest_positive_integer.py diff --git a/arrays/first_duplicate.py b/src/arrays/first_duplicate.py similarity index 100% rename from arrays/first_duplicate.py rename to src/arrays/first_duplicate.py diff --git a/arrays/first_not_repeating_character.py b/src/arrays/first_not_repeating_character.py similarity index 100% rename from arrays/first_not_repeating_character.py rename to src/arrays/first_not_repeating_character.py diff --git a/arrays/intersection_of_two_arrays_ii.py b/src/arrays/intersection_of_two_arrays_ii.py similarity index 100% rename from arrays/intersection_of_two_arrays_ii.py rename to src/arrays/intersection_of_two_arrays_ii.py diff --git a/arrays/largest_number_at_least_twice_of_others.py b/src/arrays/largest_number_at_least_twice_of_others.py similarity index 100% rename from arrays/largest_number_at_least_twice_of_others.py rename to src/arrays/largest_number_at_least_twice_of_others.py diff --git a/arrays/make_array_consecutive.py b/src/arrays/make_array_consecutive.py similarity index 100% rename from arrays/make_array_consecutive.py rename to src/arrays/make_array_consecutive.py diff --git a/arrays/max_consecutive_ones.py b/src/arrays/max_consecutive_ones.py similarity index 100% rename from arrays/max_consecutive_ones.py rename to src/arrays/max_consecutive_ones.py diff --git a/arrays/max_subarray.py b/src/arrays/max_subarray.py similarity index 100% rename from arrays/max_subarray.py rename to src/arrays/max_subarray.py diff --git a/arrays/merge_sorted_array.py b/src/arrays/merge_sorted_array.py similarity index 100% rename from arrays/merge_sorted_array.py rename to src/arrays/merge_sorted_array.py diff --git a/arrays/minimum_subarray_length.py b/src/arrays/minimum_subarray_length.py similarity index 100% rename from arrays/minimum_subarray_length.py rename to src/arrays/minimum_subarray_length.py diff --git a/arrays/missing_number.py b/src/arrays/missing_number.py similarity index 100% rename from arrays/missing_number.py rename to src/arrays/missing_number.py diff --git a/arrays/move_zeros.py b/src/arrays/move_zeros.py similarity index 100% rename from arrays/move_zeros.py rename to src/arrays/move_zeros.py diff --git a/arrays/pascals_triangle_ii.py b/src/arrays/pascals_triangle_ii.py similarity index 100% rename from arrays/pascals_triangle_ii.py rename to src/arrays/pascals_triangle_ii.py diff --git a/arrays/peaks.py b/src/arrays/peaks.py similarity index 100% rename from arrays/peaks.py rename to src/arrays/peaks.py diff --git a/arrays/plus_one.py b/src/arrays/plus_one.py similarity index 100% rename from arrays/plus_one.py rename to src/arrays/plus_one.py diff --git a/arrays/remove_duplicates.py b/src/arrays/remove_duplicates.py similarity index 100% rename from arrays/remove_duplicates.py rename to src/arrays/remove_duplicates.py diff --git a/arrays/remove_element.py b/src/arrays/remove_element.py similarity index 100% rename from arrays/remove_element.py rename to src/arrays/remove_element.py diff --git a/arrays/replace_elements_with_greatest.py b/src/arrays/replace_elements_with_greatest.py similarity index 100% rename from arrays/replace_elements_with_greatest.py rename to src/arrays/replace_elements_with_greatest.py diff --git a/arrays/rotate_array.py b/src/arrays/rotate_array.py similarity index 100% rename from arrays/rotate_array.py rename to src/arrays/rotate_array.py diff --git a/arrays/single_number.py b/src/arrays/single_number.py similarity index 100% rename from arrays/single_number.py rename to src/arrays/single_number.py diff --git a/arrays/sort_by_parity.py b/src/arrays/sort_by_parity.py similarity index 100% rename from arrays/sort_by_parity.py rename to src/arrays/sort_by_parity.py diff --git a/arrays/sorted_squares.py b/src/arrays/sorted_squares.py similarity index 100% rename from arrays/sorted_squares.py rename to src/arrays/sorted_squares.py diff --git a/arrays/third_max.py b/src/arrays/third_max.py similarity index 100% rename from arrays/third_max.py rename to src/arrays/third_max.py diff --git a/arrays/two_sum.py b/src/arrays/two_sum.py similarity index 100% rename from arrays/two_sum.py rename to src/arrays/two_sum.py diff --git a/arrays/two_sum_ii.py b/src/arrays/two_sum_ii.py similarity index 100% rename from arrays/two_sum_ii.py rename to src/arrays/two_sum_ii.py diff --git a/arrays/valid_mountain_array.py b/src/arrays/valid_mountain_array.py similarity index 100% rename from arrays/valid_mountain_array.py rename to src/arrays/valid_mountain_array.py diff --git a/binary_search/__init__.py b/src/binary_search/__init__.py similarity index 100% rename from binary_search/__init__.py rename to src/binary_search/__init__.py diff --git a/binary_search/search_insert_position.py b/src/binary_search/search_insert_position.py similarity index 100% rename from binary_search/search_insert_position.py rename to src/binary_search/search_insert_position.py diff --git a/binary_tree/__init__.py b/src/binary_tree/__init__.py similarity index 100% rename from binary_tree/__init__.py rename to src/binary_tree/__init__.py diff --git a/binary_tree/binary_tree_path.py b/src/binary_tree/binary_tree_path.py similarity index 100% rename from binary_tree/binary_tree_path.py rename to src/binary_tree/binary_tree_path.py diff --git a/binary_tree/even_odd_tree.py b/src/binary_tree/even_odd_tree.py similarity index 97% rename from binary_tree/even_odd_tree.py rename to src/binary_tree/even_odd_tree.py index 3536913..b9b812b 100644 --- a/binary_tree/even_odd_tree.py +++ b/src/binary_tree/even_odd_tree.py @@ -13,7 +13,7 @@ from collections import deque -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def even_odd_tree(root: TreeNode | None): diff --git a/binary_tree/find_mode.py b/src/binary_tree/find_mode.py similarity index 94% rename from binary_tree/find_mode.py rename to src/binary_tree/find_mode.py index 0916c21..598170b 100644 --- a/binary_tree/find_mode.py +++ b/src/binary_tree/find_mode.py @@ -1,6 +1,6 @@ from collections import Counter -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def find_mode(root: TreeNode) -> list: diff --git a/binary_tree/has_path_sum.py b/src/binary_tree/has_path_sum.py similarity index 92% rename from binary_tree/has_path_sum.py rename to src/binary_tree/has_path_sum.py index 9a3c414..f6c9dd7 100644 --- a/binary_tree/has_path_sum.py +++ b/src/binary_tree/has_path_sum.py @@ -1,4 +1,4 @@ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def has_path_sum(root: TreeNode, target: int) -> bool: diff --git a/binary_tree/inorder_traversal.py b/src/binary_tree/inorder_traversal.py similarity index 95% rename from binary_tree/inorder_traversal.py rename to src/binary_tree/inorder_traversal.py index 62d189c..67493ce 100644 --- a/binary_tree/inorder_traversal.py +++ b/src/binary_tree/inorder_traversal.py @@ -16,7 +16,7 @@ """ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def inorder_traversal(root: TreeNode) -> list[int]: diff --git a/binary_tree/level_order_traversal.py b/src/binary_tree/level_order_traversal.py similarity index 95% rename from binary_tree/level_order_traversal.py rename to src/binary_tree/level_order_traversal.py index ac00e66..710b2bc 100644 --- a/binary_tree/level_order_traversal.py +++ b/src/binary_tree/level_order_traversal.py @@ -1,6 +1,6 @@ from collections import deque -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def level_order_traversal(root: TreeNode) -> list[list[int]]: diff --git a/binary_tree/max_depth.py b/src/binary_tree/max_depth.py similarity index 93% rename from binary_tree/max_depth.py rename to src/binary_tree/max_depth.py index faa5658..58e62ab 100644 --- a/binary_tree/max_depth.py +++ b/src/binary_tree/max_depth.py @@ -1,4 +1,4 @@ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def max_depth(root: TreeNode) -> int: diff --git a/binary_tree/min_depth.py b/src/binary_tree/min_depth.py similarity index 96% rename from binary_tree/min_depth.py rename to src/binary_tree/min_depth.py index 6045451..cbc86af 100644 --- a/binary_tree/min_depth.py +++ b/src/binary_tree/min_depth.py @@ -24,7 +24,7 @@ from collections import deque -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def min_depth(root: TreeNode) -> int: diff --git a/binary_tree/next_right_pointer.py b/src/binary_tree/next_right_pointer.py similarity index 100% rename from binary_tree/next_right_pointer.py rename to src/binary_tree/next_right_pointer.py diff --git a/binary_tree/postorder_traversal.py b/src/binary_tree/postorder_traversal.py similarity index 96% rename from binary_tree/postorder_traversal.py rename to src/binary_tree/postorder_traversal.py index 7e31a98..2be67dd 100644 --- a/binary_tree/postorder_traversal.py +++ b/src/binary_tree/postorder_traversal.py @@ -19,7 +19,7 @@ """ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def postorder_traversal_recursive(root: TreeNode) -> list[int]: diff --git a/binary_tree/preorder_traversal.py b/src/binary_tree/preorder_traversal.py similarity index 97% rename from binary_tree/preorder_traversal.py rename to src/binary_tree/preorder_traversal.py index 3ef0837..dc71da0 100644 --- a/binary_tree/preorder_traversal.py +++ b/src/binary_tree/preorder_traversal.py @@ -16,7 +16,7 @@ """ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def preorder_traversal_iterative(root: TreeNode) -> list[int]: diff --git a/binary_tree/symmetric_binary_tree.py b/src/binary_tree/symmetric_binary_tree.py similarity index 96% rename from binary_tree/symmetric_binary_tree.py rename to src/binary_tree/symmetric_binary_tree.py index ca6b9b6..1a32b52 100644 --- a/binary_tree/symmetric_binary_tree.py +++ b/src/binary_tree/symmetric_binary_tree.py @@ -1,4 +1,4 @@ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def symmetric_binary_tree(root: TreeNode | None) -> bool: diff --git a/binary_tree/tree_from_inorder_postorder.py b/src/binary_tree/tree_from_inorder_postorder.py similarity index 95% rename from binary_tree/tree_from_inorder_postorder.py rename to src/binary_tree/tree_from_inorder_postorder.py index 437c362..783365b 100644 --- a/binary_tree/tree_from_inorder_postorder.py +++ b/src/binary_tree/tree_from_inorder_postorder.py @@ -1,4 +1,4 @@ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def tree_from_inorder_and_postorder(inorder: list[int], postorder: list[int]) -> TreeNode: diff --git a/binary_tree/tree_from_preorder_inorder.py b/src/binary_tree/tree_from_preorder_inorder.py similarity index 96% rename from binary_tree/tree_from_preorder_inorder.py rename to src/binary_tree/tree_from_preorder_inorder.py index f30c4dc..fff4965 100644 --- a/binary_tree/tree_from_preorder_inorder.py +++ b/src/binary_tree/tree_from_preorder_inorder.py @@ -1,4 +1,4 @@ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def tree_from_preorder_inorder(preorder: list[int], inorder: list[int]) -> TreeNode: diff --git a/binary_tree/tree_node.py b/src/binary_tree/tree_node.py similarity index 100% rename from binary_tree/tree_node.py rename to src/binary_tree/tree_node.py diff --git a/binary_tree/two_sum_iv.py b/src/binary_tree/two_sum_iv.py similarity index 94% rename from binary_tree/two_sum_iv.py rename to src/binary_tree/two_sum_iv.py index 8c99d30..f2b9cfe 100644 --- a/binary_tree/two_sum_iv.py +++ b/src/binary_tree/two_sum_iv.py @@ -1,4 +1,4 @@ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def two_sum_iv(root: TreeNode, target: int) -> bool: diff --git a/binary_tree/valid_binary_search_tree.py b/src/binary_tree/valid_binary_search_tree.py similarity index 94% rename from binary_tree/valid_binary_search_tree.py rename to src/binary_tree/valid_binary_search_tree.py index 51603c9..62390f6 100644 --- a/binary_tree/valid_binary_search_tree.py +++ b/src/binary_tree/valid_binary_search_tree.py @@ -1,4 +1,4 @@ -from binary_tree.tree_node import TreeNode +from src.binary_tree.tree_node import TreeNode def valid_bst(root: TreeNode, min_value=float("-inf"), max_value=float("inf")) -> bool: diff --git a/circularly_linked_list/__init__.py b/src/circularly_linked_list/__init__.py similarity index 100% rename from circularly_linked_list/__init__.py rename to src/circularly_linked_list/__init__.py diff --git a/circularly_linked_list/insert_cyclic_list.py b/src/circularly_linked_list/insert_cyclic_list.py similarity index 95% rename from circularly_linked_list/insert_cyclic_list.py rename to src/circularly_linked_list/insert_cyclic_list.py index 16406f0..c68cfde 100644 --- a/circularly_linked_list/insert_cyclic_list.py +++ b/src/circularly_linked_list/insert_cyclic_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def insert(head: SinglyLinkedListNode | None, value: int) -> SinglyLinkedListNode | None: diff --git a/data_structures/__init__.py b/src/data_structures/__init__.py similarity index 100% rename from data_structures/__init__.py rename to src/data_structures/__init__.py diff --git a/data_structures/binary_tree.py b/src/data_structures/binary_tree.py similarity index 90% rename from data_structures/binary_tree.py rename to src/data_structures/binary_tree.py index 7230c3b..c03bac2 100644 --- a/data_structures/binary_tree.py +++ b/src/data_structures/binary_tree.py @@ -1,4 +1,4 @@ -from data_structures.binary_tree_node import BinaryTreeNode +from src.data_structures.binary_tree_node import BinaryTreeNode class BinaryTree: diff --git a/data_structures/binary_tree_node.py b/src/data_structures/binary_tree_node.py similarity index 100% rename from data_structures/binary_tree_node.py rename to src/data_structures/binary_tree_node.py diff --git a/data_structures/circularly_linked_list.py b/src/data_structures/circularly_linked_list.py similarity index 97% rename from data_structures/circularly_linked_list.py rename to src/data_structures/circularly_linked_list.py index 04abd71..284dc0e 100644 --- a/data_structures/circularly_linked_list.py +++ b/src/data_structures/circularly_linked_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode class CircularlyLinkedList: diff --git a/data_structures/doubly_linked_list.py b/src/data_structures/doubly_linked_list.py similarity index 97% rename from data_structures/doubly_linked_list.py rename to src/data_structures/doubly_linked_list.py index 578f938..f6dc573 100644 --- a/data_structures/doubly_linked_list.py +++ b/src/data_structures/doubly_linked_list.py @@ -1,4 +1,4 @@ -from data_structures.doubly_linked_list_node import DoublyLinkedListNode +from src.data_structures.doubly_linked_list_node import DoublyLinkedListNode class DoublyLinkedList[T]: diff --git a/data_structures/doubly_linked_list_node.py b/src/data_structures/doubly_linked_list_node.py similarity index 100% rename from data_structures/doubly_linked_list_node.py rename to src/data_structures/doubly_linked_list_node.py diff --git a/data_structures/min_heap.py b/src/data_structures/min_heap.py similarity index 100% rename from data_structures/min_heap.py rename to src/data_structures/min_heap.py diff --git a/data_structures/queues.py b/src/data_structures/queues.py similarity index 97% rename from data_structures/queues.py rename to src/data_structures/queues.py index 39533b5..ab76e29 100644 --- a/data_structures/queues.py +++ b/src/data_structures/queues.py @@ -14,7 +14,7 @@ directly as a queue (`queue.append(1)` to enqueue, `queue.popleft()` to dequeue). """ -from data_structures.doubly_linked_list import DoublyLinkedList +from src.data_structures.doubly_linked_list import DoublyLinkedList class QueueList: diff --git a/data_structures/singly_linked_list.py b/src/data_structures/singly_linked_list.py similarity index 97% rename from data_structures/singly_linked_list.py rename to src/data_structures/singly_linked_list.py index d376454..cc1592b 100644 --- a/data_structures/singly_linked_list.py +++ b/src/data_structures/singly_linked_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode class SinglyLinkedList[T]: diff --git a/data_structures/singly_linked_list_node.py b/src/data_structures/singly_linked_list_node.py similarity index 100% rename from data_structures/singly_linked_list_node.py rename to src/data_structures/singly_linked_list_node.py diff --git a/data_structures/stack.py b/src/data_structures/stack.py similarity index 100% rename from data_structures/stack.py rename to src/data_structures/stack.py diff --git a/data_structures/trie_with_array.py b/src/data_structures/trie_with_array.py similarity index 100% rename from data_structures/trie_with_array.py rename to src/data_structures/trie_with_array.py diff --git a/data_structures/trie_with_dictionary.py b/src/data_structures/trie_with_dictionary.py similarity index 100% rename from data_structures/trie_with_dictionary.py rename to src/data_structures/trie_with_dictionary.py diff --git a/data_structures/trie_with_flat_dictionary.py b/src/data_structures/trie_with_flat_dictionary.py similarity index 100% rename from data_structures/trie_with_flat_dictionary.py rename to src/data_structures/trie_with_flat_dictionary.py diff --git a/doubly_linked_list/__init__.py b/src/doubly_linked_list/__init__.py similarity index 100% rename from doubly_linked_list/__init__.py rename to src/doubly_linked_list/__init__.py diff --git a/doubly_linked_list/flatten_doubly_linked_lists.py b/src/doubly_linked_list/flatten_doubly_linked_lists.py similarity index 100% rename from doubly_linked_list/flatten_doubly_linked_lists.py rename to src/doubly_linked_list/flatten_doubly_linked_lists.py diff --git a/integers/__init__.py b/src/integers/__init__.py similarity index 100% rename from integers/__init__.py rename to src/integers/__init__.py diff --git a/integers/fibonacci.py b/src/integers/fibonacci.py similarity index 100% rename from integers/fibonacci.py rename to src/integers/fibonacci.py diff --git a/integers/palindrome_number.py b/src/integers/palindrome_number.py similarity index 100% rename from integers/palindrome_number.py rename to src/integers/palindrome_number.py diff --git a/integers/reverse_number.py b/src/integers/reverse_number.py similarity index 100% rename from integers/reverse_number.py rename to src/integers/reverse_number.py diff --git a/math_problems/__init__.py b/src/math_problems/__init__.py similarity index 100% rename from math_problems/__init__.py rename to src/math_problems/__init__.py diff --git a/math_problems/count_primes.py b/src/math_problems/count_primes.py similarity index 100% rename from math_problems/count_primes.py rename to src/math_problems/count_primes.py diff --git a/math_problems/fizz_buzz.py b/src/math_problems/fizz_buzz.py similarity index 100% rename from math_problems/fizz_buzz.py rename to src/math_problems/fizz_buzz.py diff --git a/math_problems/leap_year.py b/src/math_problems/leap_year.py similarity index 100% rename from math_problems/leap_year.py rename to src/math_problems/leap_year.py diff --git a/math_problems/power_of_three.py b/src/math_problems/power_of_three.py similarity index 100% rename from math_problems/power_of_three.py rename to src/math_problems/power_of_three.py diff --git a/multi_dimensional_arrays/__init__.py b/src/multi_dimensional_arrays/__init__.py similarity index 100% rename from multi_dimensional_arrays/__init__.py rename to src/multi_dimensional_arrays/__init__.py diff --git a/multi_dimensional_arrays/diagonal_traverse.py b/src/multi_dimensional_arrays/diagonal_traverse.py similarity index 100% rename from multi_dimensional_arrays/diagonal_traverse.py rename to src/multi_dimensional_arrays/diagonal_traverse.py diff --git a/multi_dimensional_arrays/pascals_triangle.py b/src/multi_dimensional_arrays/pascals_triangle.py similarity index 100% rename from multi_dimensional_arrays/pascals_triangle.py rename to src/multi_dimensional_arrays/pascals_triangle.py diff --git a/multi_dimensional_arrays/rotate_image.py b/src/multi_dimensional_arrays/rotate_image.py similarity index 100% rename from multi_dimensional_arrays/rotate_image.py rename to src/multi_dimensional_arrays/rotate_image.py diff --git a/multi_dimensional_arrays/spiral_matrix.py b/src/multi_dimensional_arrays/spiral_matrix.py similarity index 100% rename from multi_dimensional_arrays/spiral_matrix.py rename to src/multi_dimensional_arrays/spiral_matrix.py diff --git a/n_ary_tree/__init__.py b/src/n_ary_tree/__init__.py similarity index 100% rename from n_ary_tree/__init__.py rename to src/n_ary_tree/__init__.py diff --git a/n_ary_tree/encode_decode_tree.py b/src/n_ary_tree/encode_decode_tree.py similarity index 93% rename from n_ary_tree/encode_decode_tree.py rename to src/n_ary_tree/encode_decode_tree.py index a964168..28acf30 100644 --- a/n_ary_tree/encode_decode_tree.py +++ b/src/n_ary_tree/encode_decode_tree.py @@ -5,8 +5,8 @@ from collections import deque -from binary_tree.tree_node import TreeNode -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.binary_tree.tree_node import TreeNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def encode(root: NaryTreeNode) -> TreeNode | None: diff --git a/n_ary_tree/level_order_traversal.py b/src/n_ary_tree/level_order_traversal.py similarity index 92% rename from n_ary_tree/level_order_traversal.py rename to src/n_ary_tree/level_order_traversal.py index 0419110..31a7f20 100644 --- a/n_ary_tree/level_order_traversal.py +++ b/src/n_ary_tree/level_order_traversal.py @@ -1,4 +1,4 @@ -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def level_order_traversal(root: NaryTreeNode) -> list[list[int]]: diff --git a/n_ary_tree/max_depth.py b/src/n_ary_tree/max_depth.py similarity index 95% rename from n_ary_tree/max_depth.py rename to src/n_ary_tree/max_depth.py index ac463f8..bdda18e 100644 --- a/n_ary_tree/max_depth.py +++ b/src/n_ary_tree/max_depth.py @@ -6,7 +6,7 @@ farthest leaf node. """ -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def max_depth_top_down(root: NaryTreeNode) -> int: diff --git a/n_ary_tree/nary_tree_node.py b/src/n_ary_tree/nary_tree_node.py similarity index 100% rename from n_ary_tree/nary_tree_node.py rename to src/n_ary_tree/nary_tree_node.py diff --git a/n_ary_tree/postorder_traversal.py b/src/n_ary_tree/postorder_traversal.py similarity index 91% rename from n_ary_tree/postorder_traversal.py rename to src/n_ary_tree/postorder_traversal.py index 8224547..cf7eea1 100644 --- a/n_ary_tree/postorder_traversal.py +++ b/src/n_ary_tree/postorder_traversal.py @@ -1,4 +1,4 @@ -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def postorder_traversal[T](root: NaryTreeNode[T] | None) -> list[T]: diff --git a/n_ary_tree/postorder_traversal_iterative.py b/src/n_ary_tree/postorder_traversal_iterative.py similarity index 92% rename from n_ary_tree/postorder_traversal_iterative.py rename to src/n_ary_tree/postorder_traversal_iterative.py index 7b517bf..3663db9 100644 --- a/n_ary_tree/postorder_traversal_iterative.py +++ b/src/n_ary_tree/postorder_traversal_iterative.py @@ -1,6 +1,6 @@ from collections import deque -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def postorder_traversal_iterative[T](root: NaryTreeNode[T] | None) -> list[T]: diff --git a/n_ary_tree/preorder_traversal.py b/src/n_ary_tree/preorder_traversal.py similarity index 92% rename from n_ary_tree/preorder_traversal.py rename to src/n_ary_tree/preorder_traversal.py index d866949..4f4f67c 100644 --- a/n_ary_tree/preorder_traversal.py +++ b/src/n_ary_tree/preorder_traversal.py @@ -1,4 +1,4 @@ -from n_ary_tree import nary_tree_node +from src.n_ary_tree import nary_tree_node def preorder_traversal(root: nary_tree_node) -> list: diff --git a/n_ary_tree/preorder_traversal_iterative.py b/src/n_ary_tree/preorder_traversal_iterative.py similarity index 91% rename from n_ary_tree/preorder_traversal_iterative.py rename to src/n_ary_tree/preorder_traversal_iterative.py index 5297613..c626e84 100644 --- a/n_ary_tree/preorder_traversal_iterative.py +++ b/src/n_ary_tree/preorder_traversal_iterative.py @@ -1,4 +1,4 @@ -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def preorder_traversal_iterative(root: NaryTreeNode) -> list: diff --git a/queues/__init__.py b/src/queues/__init__.py similarity index 100% rename from queues/__init__.py rename to src/queues/__init__.py diff --git a/queues/moving_average.py b/src/queues/moving_average.py similarity index 100% rename from queues/moving_average.py rename to src/queues/moving_average.py diff --git a/queues/queue_with_stack.py b/src/queues/queue_with_stack.py similarity index 100% rename from queues/queue_with_stack.py rename to src/queues/queue_with_stack.py diff --git a/queues/walls_and_gates.py b/src/queues/walls_and_gates.py similarity index 100% rename from queues/walls_and_gates.py rename to src/queues/walls_and_gates.py diff --git a/singly_linked_lists/__init__.py b/src/singly_linked_lists/__init__.py similarity index 100% rename from singly_linked_lists/__init__.py rename to src/singly_linked_lists/__init__.py diff --git a/singly_linked_lists/add_two_numbers.py b/src/singly_linked_lists/add_two_numbers.py similarity index 94% rename from singly_linked_lists/add_two_numbers.py rename to src/singly_linked_lists/add_two_numbers.py index fd0d395..d0e0bfe 100644 --- a/singly_linked_lists/add_two_numbers.py +++ b/src/singly_linked_lists/add_two_numbers.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def add_two_numbers( diff --git a/singly_linked_lists/copy_list_with_random_pointer.py b/src/singly_linked_lists/copy_list_with_random_pointer.py similarity index 100% rename from singly_linked_lists/copy_list_with_random_pointer.py rename to src/singly_linked_lists/copy_list_with_random_pointer.py diff --git a/singly_linked_lists/delete_duplicates.py b/src/singly_linked_lists/delete_duplicates.py similarity index 87% rename from singly_linked_lists/delete_duplicates.py rename to src/singly_linked_lists/delete_duplicates.py index 2b411b3..308b3a8 100644 --- a/singly_linked_lists/delete_duplicates.py +++ b/src/singly_linked_lists/delete_duplicates.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def delete_duplicates(head: SinglyLinkedListNode | None) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/detect_cycle.py b/src/singly_linked_lists/detect_cycle.py similarity index 94% rename from singly_linked_lists/detect_cycle.py rename to src/singly_linked_lists/detect_cycle.py index fb62be9..f207979 100644 --- a/singly_linked_lists/detect_cycle.py +++ b/src/singly_linked_lists/detect_cycle.py @@ -3,7 +3,7 @@ Given a linked list, return the node where the cycle begins. If there is no cycle, return None. """ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def detect_cycle(head: SinglyLinkedListNode) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/find_middle_node.py b/src/singly_linked_lists/find_middle_node.py similarity index 87% rename from singly_linked_lists/find_middle_node.py rename to src/singly_linked_lists/find_middle_node.py index f73a870..611688a 100644 --- a/singly_linked_lists/find_middle_node.py +++ b/src/singly_linked_lists/find_middle_node.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def find_middle_node(head: SinglyLinkedListNode | None) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/intersection_two_linked_lists.py b/src/singly_linked_lists/intersection_two_linked_lists.py similarity index 93% rename from singly_linked_lists/intersection_two_linked_lists.py rename to src/singly_linked_lists/intersection_two_linked_lists.py index 043679d..45dc54d 100644 --- a/singly_linked_lists/intersection_two_linked_lists.py +++ b/src/singly_linked_lists/intersection_two_linked_lists.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def get_intersection_node( diff --git a/singly_linked_lists/intersection_two_linked_lists_with_set.py b/src/singly_linked_lists/intersection_two_linked_lists_with_set.py similarity index 93% rename from singly_linked_lists/intersection_two_linked_lists_with_set.py rename to src/singly_linked_lists/intersection_two_linked_lists_with_set.py index 2eca332..f3322f8 100644 --- a/singly_linked_lists/intersection_two_linked_lists_with_set.py +++ b/src/singly_linked_lists/intersection_two_linked_lists_with_set.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def get_intersection_node_with_set( diff --git a/singly_linked_lists/linked_list_cycle.py b/src/singly_linked_lists/linked_list_cycle.py similarity index 94% rename from singly_linked_lists/linked_list_cycle.py rename to src/singly_linked_lists/linked_list_cycle.py index dcb1a65..87f2603 100644 --- a/singly_linked_lists/linked_list_cycle.py +++ b/src/singly_linked_lists/linked_list_cycle.py @@ -6,7 +6,7 @@ the linked list where the tail connects to. If pos is -1, then there is no cycle in the linked list. """ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode # Time: O(N + K) -> O(N), Space: O(1) diff --git a/singly_linked_lists/merge_k_lists.py b/src/singly_linked_lists/merge_k_lists.py similarity index 93% rename from singly_linked_lists/merge_k_lists.py rename to src/singly_linked_lists/merge_k_lists.py index 2c5e97c..5868255 100644 --- a/singly_linked_lists/merge_k_lists.py +++ b/src/singly_linked_lists/merge_k_lists.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def merge_k_lists[T](lists) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/merge_two_sorted_lists.py b/src/singly_linked_lists/merge_two_sorted_lists.py similarity index 92% rename from singly_linked_lists/merge_two_sorted_lists.py rename to src/singly_linked_lists/merge_two_sorted_lists.py index 38bc1ce..36a60b6 100644 --- a/singly_linked_lists/merge_two_sorted_lists.py +++ b/src/singly_linked_lists/merge_two_sorted_lists.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def merge_two_lists( diff --git a/singly_linked_lists/odd_even_linked_list.py b/src/singly_linked_lists/odd_even_linked_list.py similarity index 91% rename from singly_linked_lists/odd_even_linked_list.py rename to src/singly_linked_lists/odd_even_linked_list.py index 625add9..7b90cff 100644 --- a/singly_linked_lists/odd_even_linked_list.py +++ b/src/singly_linked_lists/odd_even_linked_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def odd_even_list(head: SinglyLinkedListNode | None) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/palindrome_linked_list.py b/src/singly_linked_lists/palindrome_linked_list.py similarity index 81% rename from singly_linked_lists/palindrome_linked_list.py rename to src/singly_linked_lists/palindrome_linked_list.py index c1cccbb..4a0df1d 100644 --- a/singly_linked_lists/palindrome_linked_list.py +++ b/src/singly_linked_lists/palindrome_linked_list.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.find_middle_node import find_middle_node -from singly_linked_lists.reverse_linked_list import reverse_linked_list +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.find_middle_node import find_middle_node +from src.singly_linked_lists.reverse_linked_list import reverse_linked_list def is_palindrome(head: SinglyLinkedListNode | None) -> bool: diff --git a/singly_linked_lists/remove_linked_list_elements.py b/src/singly_linked_lists/remove_linked_list_elements.py similarity index 91% rename from singly_linked_lists/remove_linked_list_elements.py rename to src/singly_linked_lists/remove_linked_list_elements.py index 9b0a4b8..391c769 100644 --- a/singly_linked_lists/remove_linked_list_elements.py +++ b/src/singly_linked_lists/remove_linked_list_elements.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def remove_elements(head: SinglyLinkedListNode | None, data: int) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/remove_nth_node_from_list.py b/src/singly_linked_lists/remove_nth_node_from_list.py similarity index 91% rename from singly_linked_lists/remove_nth_node_from_list.py rename to src/singly_linked_lists/remove_nth_node_from_list.py index 4c04747..0a67ae1 100644 --- a/singly_linked_lists/remove_nth_node_from_list.py +++ b/src/singly_linked_lists/remove_nth_node_from_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def remove_nth_from_end(head: SinglyLinkedListNode, nth: int) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/reverse_linked_list.py b/src/singly_linked_lists/reverse_linked_list.py similarity index 88% rename from singly_linked_lists/reverse_linked_list.py rename to src/singly_linked_lists/reverse_linked_list.py index 9fee9e1..8c5f945 100644 --- a/singly_linked_lists/reverse_linked_list.py +++ b/src/singly_linked_lists/reverse_linked_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def reverse_linked_list(head: SinglyLinkedListNode) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/reverse_linked_list_recursive.py b/src/singly_linked_lists/reverse_linked_list_recursive.py similarity index 87% rename from singly_linked_lists/reverse_linked_list_recursive.py rename to src/singly_linked_lists/reverse_linked_list_recursive.py index df8a77a..d62a90c 100644 --- a/singly_linked_lists/reverse_linked_list_recursive.py +++ b/src/singly_linked_lists/reverse_linked_list_recursive.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def reverse_linked_list_recursive(head: SinglyLinkedListNode) -> SinglyLinkedListNode | None: diff --git a/singly_linked_lists/rotate_list.py b/src/singly_linked_lists/rotate_list.py similarity index 90% rename from singly_linked_lists/rotate_list.py rename to src/singly_linked_lists/rotate_list.py index 6ed7a93..b02eaee 100644 --- a/singly_linked_lists/rotate_list.py +++ b/src/singly_linked_lists/rotate_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def rotate_list(head: SinglyLinkedListNode | None, amount: int) -> SinglyLinkedListNode | None: diff --git a/stacks/__init__.py b/src/stacks/__init__.py similarity index 100% rename from stacks/__init__.py rename to src/stacks/__init__.py diff --git a/stacks/daily_temperatures.py b/src/stacks/daily_temperatures.py similarity index 100% rename from stacks/daily_temperatures.py rename to src/stacks/daily_temperatures.py diff --git a/stacks/decode_string.py b/src/stacks/decode_string.py similarity index 100% rename from stacks/decode_string.py rename to src/stacks/decode_string.py diff --git a/stacks/min_stack.py b/src/stacks/min_stack.py similarity index 100% rename from stacks/min_stack.py rename to src/stacks/min_stack.py diff --git a/stacks/polish_notation.py b/src/stacks/polish_notation.py similarity index 100% rename from stacks/polish_notation.py rename to src/stacks/polish_notation.py diff --git a/stacks/roman_to_integer.py b/src/stacks/roman_to_integer.py similarity index 100% rename from stacks/roman_to_integer.py rename to src/stacks/roman_to_integer.py diff --git a/stacks/stack_with_queue.py b/src/stacks/stack_with_queue.py similarity index 100% rename from stacks/stack_with_queue.py rename to src/stacks/stack_with_queue.py diff --git a/stacks/valid_parentheses.py b/src/stacks/valid_parentheses.py similarity index 100% rename from stacks/valid_parentheses.py rename to src/stacks/valid_parentheses.py diff --git a/strings/__init__.py b/src/strings/__init__.py similarity index 100% rename from strings/__init__.py rename to src/strings/__init__.py diff --git a/strings/add_binary.py b/src/strings/add_binary.py similarity index 100% rename from strings/add_binary.py rename to src/strings/add_binary.py diff --git a/strings/anagram.py b/src/strings/anagram.py similarity index 100% rename from strings/anagram.py rename to src/strings/anagram.py diff --git a/strings/crop_string.py b/src/strings/crop_string.py similarity index 100% rename from strings/crop_string.py rename to src/strings/crop_string.py diff --git a/strings/first_unique_character_in_str.py b/src/strings/first_unique_character_in_str.py similarity index 100% rename from strings/first_unique_character_in_str.py rename to src/strings/first_unique_character_in_str.py diff --git a/strings/group_anagrams.py b/src/strings/group_anagrams.py similarity index 100% rename from strings/group_anagrams.py rename to src/strings/group_anagrams.py diff --git a/strings/implement_str_str.py b/src/strings/implement_str_str.py similarity index 100% rename from strings/implement_str_str.py rename to src/strings/implement_str_str.py diff --git a/strings/jewels_and_stones.py b/src/strings/jewels_and_stones.py similarity index 100% rename from strings/jewels_and_stones.py rename to src/strings/jewels_and_stones.py diff --git a/strings/license_key_formatter.py b/src/strings/license_key_formatter.py similarity index 100% rename from strings/license_key_formatter.py rename to src/strings/license_key_formatter.py diff --git a/strings/longest_common_prefix.py b/src/strings/longest_common_prefix.py similarity index 100% rename from strings/longest_common_prefix.py rename to src/strings/longest_common_prefix.py diff --git a/strings/longest_substring_without_duplicates.py b/src/strings/longest_substring_without_duplicates.py similarity index 100% rename from strings/longest_substring_without_duplicates.py rename to src/strings/longest_substring_without_duplicates.py diff --git a/strings/multiply_strings.py b/src/strings/multiply_strings.py similarity index 100% rename from strings/multiply_strings.py rename to src/strings/multiply_strings.py diff --git a/strings/palindrome.py b/src/strings/palindrome.py similarity index 100% rename from strings/palindrome.py rename to src/strings/palindrome.py diff --git a/strings/palindrome_permutation.py b/src/strings/palindrome_permutation.py similarity index 100% rename from strings/palindrome_permutation.py rename to src/strings/palindrome_permutation.py diff --git a/strings/pangram.py b/src/strings/pangram.py similarity index 100% rename from strings/pangram.py rename to src/strings/pangram.py diff --git a/strings/reverse_string.py b/src/strings/reverse_string.py similarity index 100% rename from strings/reverse_string.py rename to src/strings/reverse_string.py diff --git a/strings/reverse_words.py b/src/strings/reverse_words.py similarity index 100% rename from strings/reverse_words.py rename to src/strings/reverse_words.py diff --git a/strings/reverse_words_ii.py b/src/strings/reverse_words_ii.py similarity index 100% rename from strings/reverse_words_ii.py rename to src/strings/reverse_words_ii.py diff --git a/strings/run_length_encoding.py b/src/strings/run_length_encoding.py similarity index 100% rename from strings/run_length_encoding.py rename to src/strings/run_length_encoding.py diff --git a/strings/string_to_integer.py b/src/strings/string_to_integer.py similarity index 100% rename from strings/string_to_integer.py rename to src/strings/string_to_integer.py diff --git a/strings/string_to_integer_ii.py b/src/strings/string_to_integer_ii.py similarity index 100% rename from strings/string_to_integer_ii.py rename to src/strings/string_to_integer_ii.py diff --git a/strings/unique_emails.py b/src/strings/unique_emails.py similarity index 100% rename from strings/unique_emails.py rename to src/strings/unique_emails.py diff --git a/strings/valid_word_abbreviation.py b/src/strings/valid_word_abbreviation.py similarity index 100% rename from strings/valid_word_abbreviation.py rename to src/strings/valid_word_abbreviation.py diff --git a/test_helpers/__init__.py b/src/trie/__init__.py similarity index 100% rename from test_helpers/__init__.py rename to src/trie/__init__.py diff --git a/trie/map_sum.py b/src/trie/map_sum.py similarity index 100% rename from trie/map_sum.py rename to src/trie/map_sum.py diff --git a/trie/replace_words.py b/src/trie/replace_words.py similarity index 100% rename from trie/replace_words.py rename to src/trie/replace_words.py diff --git a/tests/algorithm_theory/test_binary_search.py b/tests/algorithm_theory/test_binary_search.py index 58a858a..589f473 100644 --- a/tests/algorithm_theory/test_binary_search.py +++ b/tests/algorithm_theory/test_binary_search.py @@ -1,4 +1,4 @@ -from algorithm_theory.binary_search import binary_search_iterative, binary_search_recursive +from src.algorithm_theory.binary_search import binary_search_iterative, binary_search_recursive def test_binary_search_iterative(): diff --git a/tests/algorithm_theory/test_bubble_sort.py b/tests/algorithm_theory/test_bubble_sort.py index 9e8379e..3e801ca 100644 --- a/tests/algorithm_theory/test_bubble_sort.py +++ b/tests/algorithm_theory/test_bubble_sort.py @@ -1,4 +1,4 @@ -from algorithm_theory.bubble_sort import bubble_sort +from src.algorithm_theory.bubble_sort import bubble_sort def test_bubble_sort(): diff --git a/tests/algorithm_theory/test_jump_search.py b/tests/algorithm_theory/test_jump_search.py index e076cc6..48734ea 100644 --- a/tests/algorithm_theory/test_jump_search.py +++ b/tests/algorithm_theory/test_jump_search.py @@ -1,4 +1,4 @@ -from algorithm_theory.jump_search import jump_search +from src.algorithm_theory.jump_search import jump_search def test_jump_search(): diff --git a/tests/algorithm_theory/test_linear_search.py b/tests/algorithm_theory/test_linear_search.py index 1a81985..fd43dbc 100644 --- a/tests/algorithm_theory/test_linear_search.py +++ b/tests/algorithm_theory/test_linear_search.py @@ -1,4 +1,4 @@ -from algorithm_theory.linear_search import linear_search +from src.algorithm_theory.linear_search import linear_search def test_linear_search(): diff --git a/tests/arrays/test_check_double.py b/tests/arrays/test_check_double.py index e8051ee..52f6017 100644 --- a/tests/arrays/test_check_double.py +++ b/tests/arrays/test_check_double.py @@ -1,4 +1,4 @@ -from arrays.check_double import check_double +from src.arrays.check_double import check_double def test_check_double(): diff --git a/tests/arrays/test_container_with_max_area.py b/tests/arrays/test_container_with_max_area.py index 4b4d1ff..ee77d78 100644 --- a/tests/arrays/test_container_with_max_area.py +++ b/tests/arrays/test_container_with_max_area.py @@ -1,4 +1,4 @@ -from arrays.container_with_max_area import container_with_max_area +from src.arrays.container_with_max_area import container_with_max_area def test_container_with_max_area(): diff --git a/tests/arrays/test_count_elements.py b/tests/arrays/test_count_elements.py index 362974c..a2951a4 100644 --- a/tests/arrays/test_count_elements.py +++ b/tests/arrays/test_count_elements.py @@ -1,4 +1,4 @@ -from arrays.count_elements import count_elements +from src.arrays.count_elements import count_elements def test_count_elements(): diff --git a/tests/arrays/test_duplicate_zeros.py b/tests/arrays/test_duplicate_zeros.py index 6717572..a1ed363 100644 --- a/tests/arrays/test_duplicate_zeros.py +++ b/tests/arrays/test_duplicate_zeros.py @@ -1,4 +1,4 @@ -from arrays.duplicate_zeros import duplicate_zeros +from src.arrays.duplicate_zeros import duplicate_zeros def test_duplicate_zeros(): diff --git a/tests/arrays/test_find_disappeared_numbers.py b/tests/arrays/test_find_disappeared_numbers.py index c53fd51..3ac7ec2 100644 --- a/tests/arrays/test_find_disappeared_numbers.py +++ b/tests/arrays/test_find_disappeared_numbers.py @@ -1,4 +1,7 @@ -from arrays.find_disappeared_numbers import find_disappeared_numbers, find_disappeared_numbers_ii +from src.arrays.find_disappeared_numbers import ( + find_disappeared_numbers, + find_disappeared_numbers_ii, +) def test_find_disappeared_numbers(): diff --git a/tests/arrays/test_find_index_largest_number.py b/tests/arrays/test_find_index_largest_number.py index 0910951..5cc68b3 100644 --- a/tests/arrays/test_find_index_largest_number.py +++ b/tests/arrays/test_find_index_largest_number.py @@ -1,4 +1,4 @@ -from arrays.find_index_largest_number import find_index_largest_number +from src.arrays.find_index_largest_number import find_index_largest_number def test_find_index_largest_number(): diff --git a/tests/arrays/test_find_max_consecutive_ones.py b/tests/arrays/test_find_max_consecutive_ones.py index 8eeb4f6..19ce32b 100644 --- a/tests/arrays/test_find_max_consecutive_ones.py +++ b/tests/arrays/test_find_max_consecutive_ones.py @@ -1,4 +1,4 @@ -from arrays.find_max_consecutive_ones import find_max_consecutive_ones +from src.arrays.find_max_consecutive_ones import find_max_consecutive_ones def test_find_max_consecutive_ones(): diff --git a/tests/arrays/test_find_max_consecutive_ones_with_flip.py b/tests/arrays/test_find_max_consecutive_ones_with_flip.py index bf9934a..508467a 100644 --- a/tests/arrays/test_find_max_consecutive_ones_with_flip.py +++ b/tests/arrays/test_find_max_consecutive_ones_with_flip.py @@ -1,4 +1,4 @@ -from arrays.find_max_consecutive_ones_with_flip import find_max_consecutive_ones_with_flip +from src.arrays.find_max_consecutive_ones_with_flip import find_max_consecutive_ones_with_flip def test_find_max_consecutive_ones_with_flip(): diff --git a/tests/arrays/test_find_pivot_index.py b/tests/arrays/test_find_pivot_index.py index 69737c6..25d9700 100644 --- a/tests/arrays/test_find_pivot_index.py +++ b/tests/arrays/test_find_pivot_index.py @@ -1,4 +1,4 @@ -from arrays.find_pivot_index import find_pivot_index +from src.arrays.find_pivot_index import find_pivot_index def test_find_pivot_index(): diff --git a/tests/arrays/test_find_smallest_positive_integer.py b/tests/arrays/test_find_smallest_positive_integer.py index e7eebe4..f8f8363 100644 --- a/tests/arrays/test_find_smallest_positive_integer.py +++ b/tests/arrays/test_find_smallest_positive_integer.py @@ -1,4 +1,4 @@ -from arrays.find_smallest_positive_integer import find_smallest_positive_integer +from src.arrays.find_smallest_positive_integer import find_smallest_positive_integer def test_find_smallest_positive_integer(): diff --git a/tests/arrays/test_first_duplicate.py b/tests/arrays/test_first_duplicate.py index 34b3536..2a77911 100644 --- a/tests/arrays/test_first_duplicate.py +++ b/tests/arrays/test_first_duplicate.py @@ -1,4 +1,4 @@ -from arrays.first_duplicate import first_duplicate, first_duplicate_in_place +from src.arrays.first_duplicate import first_duplicate, first_duplicate_in_place def test_first_duplicate(): diff --git a/tests/arrays/test_first_not_repeating_character.py b/tests/arrays/test_first_not_repeating_character.py index 2c5f0ed..0d89674 100644 --- a/tests/arrays/test_first_not_repeating_character.py +++ b/tests/arrays/test_first_not_repeating_character.py @@ -1,4 +1,4 @@ -from arrays.first_not_repeating_character import ( +from src.arrays.first_not_repeating_character import ( first_not_repeating_character, first_not_repeating_character_set, ) diff --git a/tests/arrays/test_intersection_of_two_arrays_ii.py b/tests/arrays/test_intersection_of_two_arrays_ii.py index dd7d03c..fea7931 100644 --- a/tests/arrays/test_intersection_of_two_arrays_ii.py +++ b/tests/arrays/test_intersection_of_two_arrays_ii.py @@ -1,4 +1,4 @@ -from arrays.intersection_of_two_arrays_ii import intersection_of_two_arrays +from src.arrays.intersection_of_two_arrays_ii import intersection_of_two_arrays def test_intersection_of_two_arrays(): diff --git a/tests/arrays/test_intersection_three_arrays.py b/tests/arrays/test_intersection_three_arrays.py index 65c5484..3d01722 100644 --- a/tests/arrays/test_intersection_three_arrays.py +++ b/tests/arrays/test_intersection_three_arrays.py @@ -1,4 +1,4 @@ -from arrays.arrays_intersection import arrays_intersection, arrays_intersection2 +from src.arrays.arrays_intersection import arrays_intersection, arrays_intersection2 def test_arrays_intersection(): diff --git a/tests/arrays/test_largest_number_twice_of_others.py b/tests/arrays/test_largest_number_twice_of_others.py index 06ab085..5a99e26 100644 --- a/tests/arrays/test_largest_number_twice_of_others.py +++ b/tests/arrays/test_largest_number_twice_of_others.py @@ -1,4 +1,4 @@ -from arrays.largest_number_at_least_twice_of_others import ( +from src.arrays.largest_number_at_least_twice_of_others import ( largest_number_at_least_twice_of_others, largest_number_at_least_twice_of_others2, ) diff --git a/tests/arrays/test_make_array_consecutive.py b/tests/arrays/test_make_array_consecutive.py index ee9c170..c750046 100644 --- a/tests/arrays/test_make_array_consecutive.py +++ b/tests/arrays/test_make_array_consecutive.py @@ -1,4 +1,4 @@ -from arrays.make_array_consecutive import make_array_consecutive +from src.arrays.make_array_consecutive import make_array_consecutive def test_make_array_consecutive(): diff --git a/tests/arrays/test_max_consecutive_ones.py b/tests/arrays/test_max_consecutive_ones.py index 9f536ee..ec413e2 100644 --- a/tests/arrays/test_max_consecutive_ones.py +++ b/tests/arrays/test_max_consecutive_ones.py @@ -1,4 +1,4 @@ -from arrays.max_consecutive_ones import max_consecutive_ones +from src.arrays.max_consecutive_ones import max_consecutive_ones def test_max_consecutive_ones(): diff --git a/tests/arrays/test_max_subarray.py b/tests/arrays/test_max_subarray.py index 7654ecd..91685ee 100644 --- a/tests/arrays/test_max_subarray.py +++ b/tests/arrays/test_max_subarray.py @@ -1,4 +1,4 @@ -from arrays.max_subarray import max_subarray +from src.arrays.max_subarray import max_subarray def test_max_subarray(): diff --git a/tests/arrays/test_merge_sorted_array.py b/tests/arrays/test_merge_sorted_array.py index 5a88d56..44506d0 100644 --- a/tests/arrays/test_merge_sorted_array.py +++ b/tests/arrays/test_merge_sorted_array.py @@ -1,4 +1,4 @@ -from arrays.merge_sorted_array import merge_sorted_array +from src.arrays.merge_sorted_array import merge_sorted_array def test_merge_sorted_array(): diff --git a/tests/arrays/test_minimum_subarray_length.py b/tests/arrays/test_minimum_subarray_length.py index bf406c6..19a78a5 100644 --- a/tests/arrays/test_minimum_subarray_length.py +++ b/tests/arrays/test_minimum_subarray_length.py @@ -1,4 +1,4 @@ -from arrays.minimum_subarray_length import minimum_subarray_length +from src.arrays.minimum_subarray_length import minimum_subarray_length def test_minimum_subarray_length(): diff --git a/tests/arrays/test_missing_number.py b/tests/arrays/test_missing_number.py index c247781..58e309b 100644 --- a/tests/arrays/test_missing_number.py +++ b/tests/arrays/test_missing_number.py @@ -1,4 +1,4 @@ -from arrays.missing_number import missing_number, missing_number_ii +from src.arrays.missing_number import missing_number, missing_number_ii def test_missing_number(): diff --git a/tests/arrays/test_move_zeros.py b/tests/arrays/test_move_zeros.py index 40895f9..4ec94ca 100644 --- a/tests/arrays/test_move_zeros.py +++ b/tests/arrays/test_move_zeros.py @@ -1,4 +1,4 @@ -from arrays.move_zeros import move_zeros +from src.arrays.move_zeros import move_zeros def test_move_zeros(): diff --git a/tests/arrays/test_pascals_triangle_ii.py b/tests/arrays/test_pascals_triangle_ii.py index bbfee6e..6dc5b78 100644 --- a/tests/arrays/test_pascals_triangle_ii.py +++ b/tests/arrays/test_pascals_triangle_ii.py @@ -1,4 +1,4 @@ -from arrays.pascals_triangle_ii import pascals_triangle_ii +from src.arrays.pascals_triangle_ii import pascals_triangle_ii def test_pascals_triangle_ii(): diff --git a/tests/arrays/test_peaks.py b/tests/arrays/test_peaks.py index 75e4a6b..d0cdf38 100644 --- a/tests/arrays/test_peaks.py +++ b/tests/arrays/test_peaks.py @@ -1,4 +1,4 @@ -from arrays.peaks import peaks +from src.arrays.peaks import peaks def test_peaks(): diff --git a/tests/arrays/test_plus_one.py b/tests/arrays/test_plus_one.py index 4f167b5..b23306f 100644 --- a/tests/arrays/test_plus_one.py +++ b/tests/arrays/test_plus_one.py @@ -1,4 +1,4 @@ -from arrays.plus_one import plus_one +from src.arrays.plus_one import plus_one def test_plus_one(): diff --git a/tests/arrays/test_remove_duplicates.py b/tests/arrays/test_remove_duplicates.py index b76dc68..2a73a92 100644 --- a/tests/arrays/test_remove_duplicates.py +++ b/tests/arrays/test_remove_duplicates.py @@ -1,4 +1,4 @@ -from arrays.remove_duplicates import remove_duplicates +from src.arrays.remove_duplicates import remove_duplicates def test_remove_duplicates(): diff --git a/tests/arrays/test_remove_element.py b/tests/arrays/test_remove_element.py index 4407d53..d25d563 100644 --- a/tests/arrays/test_remove_element.py +++ b/tests/arrays/test_remove_element.py @@ -1,4 +1,4 @@ -from arrays.remove_element import remove_element +from src.arrays.remove_element import remove_element def test_remove_element(): diff --git a/tests/arrays/test_replace_elements_with_greatest.py b/tests/arrays/test_replace_elements_with_greatest.py index f174a37..dd47f32 100644 --- a/tests/arrays/test_replace_elements_with_greatest.py +++ b/tests/arrays/test_replace_elements_with_greatest.py @@ -1,4 +1,4 @@ -from arrays.replace_elements_with_greatest import replace_elements_with_greatest +from src.arrays.replace_elements_with_greatest import replace_elements_with_greatest def test_replace_elements_with_greatest(): diff --git a/tests/arrays/test_rotate_array.py b/tests/arrays/test_rotate_array.py index 256337a..e295a89 100644 --- a/tests/arrays/test_rotate_array.py +++ b/tests/arrays/test_rotate_array.py @@ -1,4 +1,4 @@ -from arrays.rotate_array import rotate_array_in_place, rotate_array_with_array +from src.arrays.rotate_array import rotate_array_in_place, rotate_array_with_array def test_rotate_array_with_array(): diff --git a/tests/arrays/test_single_number.py b/tests/arrays/test_single_number.py index 35cbef1..c484b0e 100644 --- a/tests/arrays/test_single_number.py +++ b/tests/arrays/test_single_number.py @@ -1,4 +1,4 @@ -from arrays.single_number import single_number, single_number_bitwise +from src.arrays.single_number import single_number, single_number_bitwise def test_single_number(): diff --git a/tests/arrays/test_sort_by_parity.py b/tests/arrays/test_sort_by_parity.py index 2287b2d..68b8d78 100644 --- a/tests/arrays/test_sort_by_parity.py +++ b/tests/arrays/test_sort_by_parity.py @@ -1,4 +1,4 @@ -from arrays.sort_by_parity import sort_by_parity +from src.arrays.sort_by_parity import sort_by_parity def test_sort_by_parity(): diff --git a/tests/arrays/test_sorted_squares.py b/tests/arrays/test_sorted_squares.py index 492e880..1e858ea 100644 --- a/tests/arrays/test_sorted_squares.py +++ b/tests/arrays/test_sorted_squares.py @@ -1,4 +1,4 @@ -from arrays.sorted_squares import sorted_squares +from src.arrays.sorted_squares import sorted_squares def test_sorted_squares(): diff --git a/tests/arrays/test_third_max.py b/tests/arrays/test_third_max.py index ac34c7c..373d8ba 100644 --- a/tests/arrays/test_third_max.py +++ b/tests/arrays/test_third_max.py @@ -1,4 +1,4 @@ -from arrays.third_max import third_max +from src.arrays.third_max import third_max def test_third_max(): diff --git a/tests/arrays/test_two_sum.py b/tests/arrays/test_two_sum.py index a95d097..e2a86d0 100644 --- a/tests/arrays/test_two_sum.py +++ b/tests/arrays/test_two_sum.py @@ -1,4 +1,4 @@ -from arrays.two_sum import two_sum +from src.arrays.two_sum import two_sum def test_two_sum(): diff --git a/tests/arrays/test_two_sum_ii.py b/tests/arrays/test_two_sum_ii.py index 356aee4..76934d0 100644 --- a/tests/arrays/test_two_sum_ii.py +++ b/tests/arrays/test_two_sum_ii.py @@ -1,4 +1,4 @@ -from arrays.two_sum_ii import two_sum_ii +from src.arrays.two_sum_ii import two_sum_ii def test_two_sum_ii(): diff --git a/tests/arrays/test_valid_mountain_array.py b/tests/arrays/test_valid_mountain_array.py index 1ef6bc8..1c1b125 100644 --- a/tests/arrays/test_valid_mountain_array.py +++ b/tests/arrays/test_valid_mountain_array.py @@ -1,4 +1,4 @@ -from arrays.valid_mountain_array import valid_mountain_array +from src.arrays.valid_mountain_array import valid_mountain_array def test_valid_mountain_array(): diff --git a/tests/binary_search/test_search_insert_position.py b/tests/binary_search/test_search_insert_position.py index d5b2acd..568cf9f 100644 --- a/tests/binary_search/test_search_insert_position.py +++ b/tests/binary_search/test_search_insert_position.py @@ -1,4 +1,4 @@ -from binary_search.search_insert_position import search_insert +from src.binary_search.search_insert_position import search_insert def test_search_insert(): diff --git a/tests/binary_tree/test_binary_tree_path.py b/tests/binary_tree/test_binary_tree_path.py index def0c81..c4341cc 100644 --- a/tests/binary_tree/test_binary_tree_path.py +++ b/tests/binary_tree/test_binary_tree_path.py @@ -1,4 +1,4 @@ -from binary_tree.binary_tree_path import TreeNode, binary_tree_paths +from src.binary_tree.binary_tree_path import TreeNode, binary_tree_paths def test_binary_tree_paths(): diff --git a/tests/binary_tree/test_even_odd_tree.py b/tests/binary_tree/test_even_odd_tree.py index 2a17ccb..d8ecaa2 100644 --- a/tests/binary_tree/test_even_odd_tree.py +++ b/tests/binary_tree/test_even_odd_tree.py @@ -1,5 +1,5 @@ -from binary_tree.even_odd_tree import even_odd_tree -from binary_tree.tree_node import TreeNode +from src.binary_tree.even_odd_tree import even_odd_tree +from src.binary_tree.tree_node import TreeNode def test_even_odd_tree(): diff --git a/tests/binary_tree/test_find_mode.py b/tests/binary_tree/test_find_mode.py index 9425c23..917307c 100644 --- a/tests/binary_tree/test_find_mode.py +++ b/tests/binary_tree/test_find_mode.py @@ -1,5 +1,5 @@ -from binary_tree.find_mode import find_mode -from test_helpers.test_helpers import TreeNode, get_binary_tree +from src.binary_tree.find_mode import find_mode +from tests.test_helpers.test_helpers import TreeNode, get_binary_tree def test_find_mode(): diff --git a/tests/binary_tree/test_has_path_sum.py b/tests/binary_tree/test_has_path_sum.py index c01c953..ed4638b 100644 --- a/tests/binary_tree/test_has_path_sum.py +++ b/tests/binary_tree/test_has_path_sum.py @@ -1,6 +1,6 @@ -from binary_tree.has_path_sum import has_path_sum -from binary_tree.tree_node import TreeNode -from test_helpers.test_helpers import get_binary_tree +from src.binary_tree.has_path_sum import has_path_sum +from src.binary_tree.tree_node import TreeNode +from tests.test_helpers.test_helpers import get_binary_tree def test_has_path_sum(): diff --git a/tests/binary_tree/test_inorder_traversal.py b/tests/binary_tree/test_inorder_traversal.py index 5b6d566..5b17c1e 100644 --- a/tests/binary_tree/test_inorder_traversal.py +++ b/tests/binary_tree/test_inorder_traversal.py @@ -1,5 +1,5 @@ -from binary_tree.inorder_traversal import inorder_traversal, inorder_traversal_stack -from test_helpers.test_helpers import get_binary_tree +from src.binary_tree.inorder_traversal import inorder_traversal, inorder_traversal_stack +from tests.test_helpers.test_helpers import get_binary_tree def test_inorder_traversal(): diff --git a/tests/binary_tree/test_level_order_traversal.py b/tests/binary_tree/test_level_order_traversal.py index d36a993..5fe8940 100644 --- a/tests/binary_tree/test_level_order_traversal.py +++ b/tests/binary_tree/test_level_order_traversal.py @@ -1,5 +1,5 @@ -from binary_tree.level_order_traversal import level_order_traversal -from test_helpers.test_helpers import get_binary_tree +from src.binary_tree.level_order_traversal import level_order_traversal +from tests.test_helpers.test_helpers import get_binary_tree def test_level_order_traversal(): diff --git a/tests/binary_tree/test_max_depth.py b/tests/binary_tree/test_max_depth.py index e6c08ce..9112d55 100644 --- a/tests/binary_tree/test_max_depth.py +++ b/tests/binary_tree/test_max_depth.py @@ -1,5 +1,5 @@ -from binary_tree.max_depth import max_depth -from test_helpers.test_helpers import get_binary_tree +from src.binary_tree.max_depth import max_depth +from tests.test_helpers.test_helpers import get_binary_tree def test_max_depth(): diff --git a/tests/binary_tree/test_min_depth.py b/tests/binary_tree/test_min_depth.py index c3077d1..5986b51 100644 --- a/tests/binary_tree/test_min_depth.py +++ b/tests/binary_tree/test_min_depth.py @@ -1,5 +1,5 @@ -from binary_tree.min_depth import min_depth, min_depth_bfs -from test_helpers.test_helpers import get_binary_tree +from src.binary_tree.min_depth import min_depth, min_depth_bfs +from tests.test_helpers.test_helpers import get_binary_tree def test_min_depth(): diff --git a/tests/binary_tree/test_next_right_pointer.py b/tests/binary_tree/test_next_right_pointer.py index 43c7786..e4e7a3b 100644 --- a/tests/binary_tree/test_next_right_pointer.py +++ b/tests/binary_tree/test_next_right_pointer.py @@ -1,4 +1,4 @@ -from binary_tree.next_right_pointer import Node, next_right_pointer +from src.binary_tree.next_right_pointer import Node, next_right_pointer def test_next_right_pointer(): diff --git a/tests/binary_tree/test_postorder_traversal.py b/tests/binary_tree/test_postorder_traversal.py index b8dfab2..29c620c 100644 --- a/tests/binary_tree/test_postorder_traversal.py +++ b/tests/binary_tree/test_postorder_traversal.py @@ -1,8 +1,8 @@ -from binary_tree.postorder_traversal import ( +from src.binary_tree.postorder_traversal import ( postorder_traversal_iterative, postorder_traversal_recursive, ) -from test_helpers.test_helpers import get_binary_tree +from tests.test_helpers.test_helpers import get_binary_tree def test_postorder_traversal_iterative(): diff --git a/tests/binary_tree/test_pre_order_traversal.py b/tests/binary_tree/test_pre_order_traversal.py index 9298c0d..f0b81fd 100644 --- a/tests/binary_tree/test_pre_order_traversal.py +++ b/tests/binary_tree/test_pre_order_traversal.py @@ -1,9 +1,9 @@ -from binary_tree.preorder_traversal import ( +from src.binary_tree.preorder_traversal import ( preorder_traversal_iterative, preorder_traversal_morris, preorder_traversal_recursive, ) -from test_helpers.test_helpers import get_binary_tree +from tests.test_helpers.test_helpers import get_binary_tree def test_preorder_traversal_iterative(): diff --git a/tests/binary_tree/test_symmetric_binary_tree.py b/tests/binary_tree/test_symmetric_binary_tree.py index 8f2c3dd..ec6da03 100644 --- a/tests/binary_tree/test_symmetric_binary_tree.py +++ b/tests/binary_tree/test_symmetric_binary_tree.py @@ -1,5 +1,5 @@ -from binary_tree.symmetric_binary_tree import symmetric_binary_tree -from binary_tree.tree_node import TreeNode +from src.binary_tree.symmetric_binary_tree import symmetric_binary_tree +from src.binary_tree.tree_node import TreeNode def test_symmetric_binary_tree(): diff --git a/tests/binary_tree/test_tree_from_inorder_postorder.py b/tests/binary_tree/test_tree_from_inorder_postorder.py index 2a8ef8e..c6b6d01 100644 --- a/tests/binary_tree/test_tree_from_inorder_postorder.py +++ b/tests/binary_tree/test_tree_from_inorder_postorder.py @@ -1,6 +1,6 @@ -from binary_tree.tree_from_inorder_postorder import tree_from_inorder_and_postorder -from binary_tree.tree_node import TreeNode -from test_helpers.test_helpers import get_binary_tree_values +from src.binary_tree.tree_from_inorder_postorder import tree_from_inorder_and_postorder +from src.binary_tree.tree_node import TreeNode +from tests.test_helpers.test_helpers import get_binary_tree_values def test_tree_from_inorder_postorder(): diff --git a/tests/binary_tree/test_tree_from_preorder_inorder.py b/tests/binary_tree/test_tree_from_preorder_inorder.py index 0f49758..cb49607 100644 --- a/tests/binary_tree/test_tree_from_preorder_inorder.py +++ b/tests/binary_tree/test_tree_from_preorder_inorder.py @@ -1,6 +1,6 @@ -from binary_tree.tree_from_preorder_inorder import tree_from_preorder_inorder -from binary_tree.tree_node import TreeNode -from test_helpers.test_helpers import get_binary_tree_values +from src.binary_tree.tree_from_preorder_inorder import tree_from_preorder_inorder +from src.binary_tree.tree_node import TreeNode +from tests.test_helpers.test_helpers import get_binary_tree_values def test_tree_from_preorder_inorder(): diff --git a/tests/binary_tree/test_two_sum_iv.py b/tests/binary_tree/test_two_sum_iv.py index d16dd55..a477fcc 100644 --- a/tests/binary_tree/test_two_sum_iv.py +++ b/tests/binary_tree/test_two_sum_iv.py @@ -1,5 +1,5 @@ -from binary_tree.two_sum_iv import two_sum_iv -from test_helpers.test_helpers import TreeNode, get_binary_tree +from src.binary_tree.two_sum_iv import two_sum_iv +from tests.test_helpers.test_helpers import TreeNode, get_binary_tree def test_two_sum_iv(): diff --git a/tests/binary_tree/test_valid_binary_search_tree.py b/tests/binary_tree/test_valid_binary_search_tree.py index ee2e2b9..ada4882 100644 --- a/tests/binary_tree/test_valid_binary_search_tree.py +++ b/tests/binary_tree/test_valid_binary_search_tree.py @@ -1,5 +1,5 @@ -from binary_tree.valid_binary_search_tree import valid_bst -from test_helpers.test_helpers import get_binary_search_tree +from src.binary_tree.valid_binary_search_tree import valid_bst +from tests.test_helpers.test_helpers import get_binary_search_tree def test_valid_bst(): diff --git a/tests/circularly_linked_list/test_insert_cyclic_list.py b/tests/circularly_linked_list/test_insert_cyclic_list.py index ac498d7..c45b4d8 100644 --- a/tests/circularly_linked_list/test_insert_cyclic_list.py +++ b/tests/circularly_linked_list/test_insert_cyclic_list.py @@ -1,6 +1,6 @@ -from circularly_linked_list.insert_cyclic_list import insert -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from test_helpers.test_helpers import get_cyclic_list_values +from src.circularly_linked_list.insert_cyclic_list import insert +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from tests.test_helpers.test_helpers import get_cyclic_list_values def test_insert(): diff --git a/tests/data_structures/test_binary_tree.py b/tests/data_structures/test_binary_tree.py index 69a22a8..d3a67c7 100644 --- a/tests/data_structures/test_binary_tree.py +++ b/tests/data_structures/test_binary_tree.py @@ -1,5 +1,5 @@ -from data_structures.binary_tree import BinaryTree -from data_structures.binary_tree_node import BinaryTreeNode +from src.data_structures.binary_tree import BinaryTree +from src.data_structures.binary_tree_node import BinaryTreeNode def test_init(): diff --git a/tests/data_structures/test_binary_tree_node.py b/tests/data_structures/test_binary_tree_node.py index de82b9b..320b05d 100644 --- a/tests/data_structures/test_binary_tree_node.py +++ b/tests/data_structures/test_binary_tree_node.py @@ -1,4 +1,4 @@ -from data_structures.binary_tree_node import BinaryTreeNode +from src.data_structures.binary_tree_node import BinaryTreeNode def test_init(): diff --git a/tests/data_structures/test_circularly_linked_list.py b/tests/data_structures/test_circularly_linked_list.py index 94ffa7c..2bf3425 100644 --- a/tests/data_structures/test_circularly_linked_list.py +++ b/tests/data_structures/test_circularly_linked_list.py @@ -1,5 +1,5 @@ -from data_structures.circularly_linked_list import CircularlyLinkedList -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.circularly_linked_list import CircularlyLinkedList +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode EMPTY_LIST = CircularlyLinkedList() ONE_NODE_LIST = CircularlyLinkedList(SinglyLinkedListNode(1)) diff --git a/tests/data_structures/test_doubly_linked_list.py b/tests/data_structures/test_doubly_linked_list.py index 7501b5f..97d11e0 100644 --- a/tests/data_structures/test_doubly_linked_list.py +++ b/tests/data_structures/test_doubly_linked_list.py @@ -1,4 +1,4 @@ -from data_structures.doubly_linked_list import DoublyLinkedList +from src.data_structures.doubly_linked_list import DoublyLinkedList def test_init(): diff --git a/tests/data_structures/test_doubly_linked_list_node.py b/tests/data_structures/test_doubly_linked_list_node.py index a0ae610..9bdf401 100644 --- a/tests/data_structures/test_doubly_linked_list_node.py +++ b/tests/data_structures/test_doubly_linked_list_node.py @@ -1,4 +1,4 @@ -from data_structures.doubly_linked_list_node import DoublyLinkedListNode +from src.data_structures.doubly_linked_list_node import DoublyLinkedListNode def test_doubly_linked_list_node(): diff --git a/tests/data_structures/test_min_heap.py b/tests/data_structures/test_min_heap.py index ed20ec8..cbd551b 100644 --- a/tests/data_structures/test_min_heap.py +++ b/tests/data_structures/test_min_heap.py @@ -1,4 +1,4 @@ -from data_structures.min_heap import MinHeap +from src.data_structures.min_heap import MinHeap def test_min_heap_init(): diff --git a/tests/data_structures/test_queue.py b/tests/data_structures/test_queue.py index 8326b6b..0b76bf1 100644 --- a/tests/data_structures/test_queue.py +++ b/tests/data_structures/test_queue.py @@ -1,4 +1,4 @@ -from data_structures.queues import CircularQueue, QueueLinkedList, QueueList +from src.data_structures.queues import CircularQueue, QueueLinkedList, QueueList def test_queue_list(): diff --git a/tests/data_structures/test_singly_linked_list.py b/tests/data_structures/test_singly_linked_list.py index fbe96d3..512a69a 100644 --- a/tests/data_structures/test_singly_linked_list.py +++ b/tests/data_structures/test_singly_linked_list.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list import SinglyLinkedList +from src.data_structures.singly_linked_list import SinglyLinkedList EMPTY_LIST = SinglyLinkedList() diff --git a/tests/data_structures/test_singly_linked_list_node.py b/tests/data_structures/test_singly_linked_list_node.py index 6b5e99c..4f00fdf 100644 --- a/tests/data_structures/test_singly_linked_list_node.py +++ b/tests/data_structures/test_singly_linked_list_node.py @@ -1,4 +1,4 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode def test_singly_linked_list_node(): diff --git a/tests/data_structures/test_stack.py b/tests/data_structures/test_stack.py index 0b79714..ef7166c 100644 --- a/tests/data_structures/test_stack.py +++ b/tests/data_structures/test_stack.py @@ -1,4 +1,4 @@ -from data_structures.stack import StackList +from src.data_structures.stack import StackList def test_stack(): diff --git a/tests/data_structures/test_trie_with_array.py b/tests/data_structures/test_trie_with_array.py index 5e8b30f..507a57a 100644 --- a/tests/data_structures/test_trie_with_array.py +++ b/tests/data_structures/test_trie_with_array.py @@ -1,4 +1,4 @@ -from data_structures.trie_with_array import TrieWithArray +from src.data_structures.trie_with_array import TrieWithArray def test_trie_with_array(): diff --git a/tests/data_structures/test_trie_with_dictionary.py b/tests/data_structures/test_trie_with_dictionary.py index c59bb00..9f67481 100644 --- a/tests/data_structures/test_trie_with_dictionary.py +++ b/tests/data_structures/test_trie_with_dictionary.py @@ -1,4 +1,4 @@ -from data_structures.trie_with_dictionary import TrieWithDictionary +from src.data_structures.trie_with_dictionary import TrieWithDictionary def test_trie_with_dictionary(): diff --git a/tests/data_structures/test_trie_with_flat_dictionary.py b/tests/data_structures/test_trie_with_flat_dictionary.py index b245dbd..aea1895 100644 --- a/tests/data_structures/test_trie_with_flat_dictionary.py +++ b/tests/data_structures/test_trie_with_flat_dictionary.py @@ -1,4 +1,4 @@ -from data_structures.trie_with_flat_dictionary import TrieWithFlatDictionary +from src.data_structures.trie_with_flat_dictionary import TrieWithFlatDictionary def test_trie_with_flat_dictionary(): diff --git a/tests/doubly_linked_list/test_flatten_doubly_linked_lists.py b/tests/doubly_linked_list/test_flatten_doubly_linked_lists.py index 426cd7a..0d46a1e 100644 --- a/tests/doubly_linked_list/test_flatten_doubly_linked_lists.py +++ b/tests/doubly_linked_list/test_flatten_doubly_linked_lists.py @@ -1,5 +1,5 @@ -from doubly_linked_list.flatten_doubly_linked_lists import Node, flatten, flatten_iterative -from test_helpers.test_helpers import get_list_values +from src.doubly_linked_list.flatten_doubly_linked_lists import Node, flatten, flatten_iterative +from tests.test_helpers.test_helpers import get_list_values def test_flatten(): diff --git a/tests/integers/test_fibonacci.py b/tests/integers/test_fibonacci.py index 0bc7696..492247c 100644 --- a/tests/integers/test_fibonacci.py +++ b/tests/integers/test_fibonacci.py @@ -1,4 +1,4 @@ -from integers.fibonacci import ( +from src.integers.fibonacci import ( fibonacci, fibonacci2, fibonacci3, diff --git a/tests/integers/test_palindrome_number.py b/tests/integers/test_palindrome_number.py index 5a1df69..60fcb4a 100644 --- a/tests/integers/test_palindrome_number.py +++ b/tests/integers/test_palindrome_number.py @@ -1,4 +1,4 @@ -from integers.palindrome_number import is_palindrome +from src.integers.palindrome_number import is_palindrome def test_is_palindrome(): diff --git a/tests/integers/test_reverse_number.py b/tests/integers/test_reverse_number.py index 21143d5..04e803e 100644 --- a/tests/integers/test_reverse_number.py +++ b/tests/integers/test_reverse_number.py @@ -1,4 +1,4 @@ -from integers.reverse_number import reverse_number +from src.integers.reverse_number import reverse_number def test_reverse_number(): diff --git a/tests/math_problems/test_count_primes.py b/tests/math_problems/test_count_primes.py index a145b3d..0f11511 100644 --- a/tests/math_problems/test_count_primes.py +++ b/tests/math_problems/test_count_primes.py @@ -1,4 +1,4 @@ -from math_problems.count_primes import count_primes +from src.math_problems.count_primes import count_primes def test_count_primes(): diff --git a/tests/math_problems/test_fizz_buzz.py b/tests/math_problems/test_fizz_buzz.py index 17409fe..0cd4584 100644 --- a/tests/math_problems/test_fizz_buzz.py +++ b/tests/math_problems/test_fizz_buzz.py @@ -1,4 +1,4 @@ -from math_problems.fizz_buzz import fizz_buzz +from src.math_problems.fizz_buzz import fizz_buzz def test_fizz_buzz(): diff --git a/tests/math_problems/test_leap_year.py b/tests/math_problems/test_leap_year.py index 6bc02a1..566727c 100644 --- a/tests/math_problems/test_leap_year.py +++ b/tests/math_problems/test_leap_year.py @@ -1,4 +1,4 @@ -from math_problems.leap_year import leap_year +from src.math_problems.leap_year import leap_year def test_leap_year(): diff --git a/tests/math_problems/test_power_of_three.py b/tests/math_problems/test_power_of_three.py index b6e5352..46fedb6 100644 --- a/tests/math_problems/test_power_of_three.py +++ b/tests/math_problems/test_power_of_three.py @@ -1,4 +1,4 @@ -from math_problems.power_of_three import power_of_three +from src.math_problems.power_of_three import power_of_three def test_power_of_three(): diff --git a/tests/multi_dimensional_arrays/test_diagonal_traverse.py b/tests/multi_dimensional_arrays/test_diagonal_traverse.py index 1db4c1f..fa4513f 100644 --- a/tests/multi_dimensional_arrays/test_diagonal_traverse.py +++ b/tests/multi_dimensional_arrays/test_diagonal_traverse.py @@ -1,4 +1,4 @@ -from multi_dimensional_arrays.diagonal_traverse import diagonal_traverse +from src.multi_dimensional_arrays.diagonal_traverse import diagonal_traverse def test_diagonal_traverse(): diff --git a/tests/multi_dimensional_arrays/test_pascals_triangle.py b/tests/multi_dimensional_arrays/test_pascals_triangle.py index df5246d..b76cac1 100644 --- a/tests/multi_dimensional_arrays/test_pascals_triangle.py +++ b/tests/multi_dimensional_arrays/test_pascals_triangle.py @@ -1,4 +1,4 @@ -from multi_dimensional_arrays.pascals_triangle import pascals_triangle +from src.multi_dimensional_arrays.pascals_triangle import pascals_triangle def test_pascals_triangle(): diff --git a/tests/multi_dimensional_arrays/test_rotate_image.py b/tests/multi_dimensional_arrays/test_rotate_image.py index 0aaffe6..b758f92 100644 --- a/tests/multi_dimensional_arrays/test_rotate_image.py +++ b/tests/multi_dimensional_arrays/test_rotate_image.py @@ -1,4 +1,4 @@ -from multi_dimensional_arrays.rotate_image import rotate_image_90_degrees +from src.multi_dimensional_arrays.rotate_image import rotate_image_90_degrees def test_rotate_image_90_degrees(): diff --git a/tests/multi_dimensional_arrays/test_spiral_matrix.py b/tests/multi_dimensional_arrays/test_spiral_matrix.py index 206f867..15bd0b4 100644 --- a/tests/multi_dimensional_arrays/test_spiral_matrix.py +++ b/tests/multi_dimensional_arrays/test_spiral_matrix.py @@ -1,4 +1,4 @@ -from multi_dimensional_arrays.spiral_matrix import spiral_matrix +from src.multi_dimensional_arrays.spiral_matrix import spiral_matrix def test_spiral_matrix(): diff --git a/tests/n_ary_tree/test_encode_decode_tree.py b/tests/n_ary_tree/test_encode_decode_tree.py index e096c0b..809c29c 100644 --- a/tests/n_ary_tree/test_encode_decode_tree.py +++ b/tests/n_ary_tree/test_encode_decode_tree.py @@ -1,5 +1,5 @@ -from n_ary_tree.encode_decode_tree import decode, encode -from test_helpers.test_helpers import get_n_ary_tree_values, get_n_nary_tree +from src.n_ary_tree.encode_decode_tree import decode, encode +from tests.test_helpers.test_helpers import get_n_ary_tree_values, get_n_nary_tree def test_encode_decode(): diff --git a/tests/n_ary_tree/test_level_order_traversal.py b/tests/n_ary_tree/test_level_order_traversal.py index c1f73d7..8ef80bb 100644 --- a/tests/n_ary_tree/test_level_order_traversal.py +++ b/tests/n_ary_tree/test_level_order_traversal.py @@ -1,5 +1,5 @@ -from n_ary_tree.level_order_traversal import level_order_traversal -from test_helpers.test_helpers import get_n_nary_tree +from src.n_ary_tree.level_order_traversal import level_order_traversal +from tests.test_helpers.test_helpers import get_n_nary_tree def test_level_order_traversal(): diff --git a/tests/n_ary_tree/test_max_depth.py b/tests/n_ary_tree/test_max_depth.py index 34dd2a4..4b84e2b 100644 --- a/tests/n_ary_tree/test_max_depth.py +++ b/tests/n_ary_tree/test_max_depth.py @@ -1,5 +1,5 @@ -from n_ary_tree.max_depth import max_depth_bottom_up, max_depth_top_down -from test_helpers.test_helpers import get_n_nary_tree +from src.n_ary_tree.max_depth import max_depth_bottom_up, max_depth_top_down +from tests.test_helpers.test_helpers import get_n_nary_tree def test_max_depth_bottom_up(): diff --git a/tests/n_ary_tree/test_nary_tree_node.py b/tests/n_ary_tree/test_nary_tree_node.py index 1f8ed47..12172cd 100644 --- a/tests/n_ary_tree/test_nary_tree_node.py +++ b/tests/n_ary_tree/test_nary_tree_node.py @@ -1,4 +1,4 @@ -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def test_nary_tree_node(): diff --git a/tests/n_ary_tree/test_postorder_traversal.py b/tests/n_ary_tree/test_postorder_traversal.py index a09b1e0..1f96a70 100644 --- a/tests/n_ary_tree/test_postorder_traversal.py +++ b/tests/n_ary_tree/test_postorder_traversal.py @@ -1,5 +1,5 @@ -from n_ary_tree.postorder_traversal import postorder_traversal -from test_helpers.test_helpers import get_n_nary_tree +from src.n_ary_tree.postorder_traversal import postorder_traversal +from tests.test_helpers.test_helpers import get_n_nary_tree def test_postorder_traversal(): diff --git a/tests/n_ary_tree/test_postorder_traversal_iterative.py b/tests/n_ary_tree/test_postorder_traversal_iterative.py index ea6ca3f..4177145 100644 --- a/tests/n_ary_tree/test_postorder_traversal_iterative.py +++ b/tests/n_ary_tree/test_postorder_traversal_iterative.py @@ -1,5 +1,5 @@ -from n_ary_tree.postorder_traversal_iterative import postorder_traversal_iterative -from test_helpers.test_helpers import get_n_nary_tree +from src.n_ary_tree.postorder_traversal_iterative import postorder_traversal_iterative +from tests.test_helpers.test_helpers import get_n_nary_tree def test_postorder_traversal_iterative(): diff --git a/tests/n_ary_tree/test_preorder_traversal.py b/tests/n_ary_tree/test_preorder_traversal.py index cc64e6c..4eddd80 100644 --- a/tests/n_ary_tree/test_preorder_traversal.py +++ b/tests/n_ary_tree/test_preorder_traversal.py @@ -1,5 +1,5 @@ -from n_ary_tree.preorder_traversal import preorder_traversal -from test_helpers.test_helpers import get_n_nary_tree +from src.n_ary_tree.preorder_traversal import preorder_traversal +from tests.test_helpers.test_helpers import get_n_nary_tree def test_preorder_traversal(): diff --git a/tests/n_ary_tree/test_preorder_traversal_iterative.py b/tests/n_ary_tree/test_preorder_traversal_iterative.py index 1324907..2396aa0 100644 --- a/tests/n_ary_tree/test_preorder_traversal_iterative.py +++ b/tests/n_ary_tree/test_preorder_traversal_iterative.py @@ -1,5 +1,5 @@ -from n_ary_tree.preorder_traversal_iterative import preorder_traversal_iterative -from test_helpers.test_helpers import get_n_nary_tree +from src.n_ary_tree.preorder_traversal_iterative import preorder_traversal_iterative +from tests.test_helpers.test_helpers import get_n_nary_tree def test_preorder_traversal_iterative(): diff --git a/tests/queues/test_moving_average.py b/tests/queues/test_moving_average.py index f75737e..2dbbe1b 100644 --- a/tests/queues/test_moving_average.py +++ b/tests/queues/test_moving_average.py @@ -1,4 +1,4 @@ -from queues.moving_average import MovingAverage +from src.queues.moving_average import MovingAverage def test_moving_average(): diff --git a/tests/queues/test_queue_with_stack.py b/tests/queues/test_queue_with_stack.py index 19128ee..f4d8c0c 100644 --- a/tests/queues/test_queue_with_stack.py +++ b/tests/queues/test_queue_with_stack.py @@ -1,4 +1,4 @@ -from queues.queue_with_stack import Queue +from src.queues.queue_with_stack import Queue def test_queue_with_stack(): diff --git a/tests/queues/test_walls_and_gates.py b/tests/queues/test_walls_and_gates.py index e95c0f0..2d5125c 100644 --- a/tests/queues/test_walls_and_gates.py +++ b/tests/queues/test_walls_and_gates.py @@ -1,4 +1,4 @@ -from queues.walls_and_gates import walls_and_gates +from src.queues.walls_and_gates import walls_and_gates def test_walls_and_gates(): diff --git a/tests/singly_linked_lists/test_add_two_numbers.py b/tests/singly_linked_lists/test_add_two_numbers.py index b5355a8..955ea53 100644 --- a/tests/singly_linked_lists/test_add_two_numbers.py +++ b/tests/singly_linked_lists/test_add_two_numbers.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.add_two_numbers import add_two_numbers -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.add_two_numbers import add_two_numbers +from tests.test_helpers.test_helpers import get_list_values def test_add_two_numbers(): diff --git a/tests/singly_linked_lists/test_copy_list_with_random_pointer.py b/tests/singly_linked_lists/test_copy_list_with_random_pointer.py index 326e1ab..efcb49d 100644 --- a/tests/singly_linked_lists/test_copy_list_with_random_pointer.py +++ b/tests/singly_linked_lists/test_copy_list_with_random_pointer.py @@ -1,4 +1,4 @@ -from singly_linked_lists.copy_list_with_random_pointer import Node, copy_random_list +from src.singly_linked_lists.copy_list_with_random_pointer import Node, copy_random_list def test_copy_random_list(): diff --git a/tests/singly_linked_lists/test_delete_duplicates.py b/tests/singly_linked_lists/test_delete_duplicates.py index 1995c89..c2a2f3c 100644 --- a/tests/singly_linked_lists/test_delete_duplicates.py +++ b/tests/singly_linked_lists/test_delete_duplicates.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.delete_duplicates import delete_duplicates -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.delete_duplicates import delete_duplicates +from tests.test_helpers.test_helpers import get_list_values def test_delete_duplicates(): diff --git a/tests/singly_linked_lists/test_detect_cycle.py b/tests/singly_linked_lists/test_detect_cycle.py index 3de26ab..230494f 100644 --- a/tests/singly_linked_lists/test_detect_cycle.py +++ b/tests/singly_linked_lists/test_detect_cycle.py @@ -1,5 +1,5 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.detect_cycle import detect_cycle, detect_cycle_with_set +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.detect_cycle import detect_cycle, detect_cycle_with_set def test_detect_cycle(): diff --git a/tests/singly_linked_lists/test_find_middle_node.py b/tests/singly_linked_lists/test_find_middle_node.py index 00b0518..59261a0 100644 --- a/tests/singly_linked_lists/test_find_middle_node.py +++ b/tests/singly_linked_lists/test_find_middle_node.py @@ -1,5 +1,5 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.find_middle_node import find_middle_node +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.find_middle_node import find_middle_node def test_find_middle_node(): diff --git a/tests/singly_linked_lists/test_intersection_two_linked_lists.py b/tests/singly_linked_lists/test_intersection_two_linked_lists.py index 60e33c4..fdd9d11 100644 --- a/tests/singly_linked_lists/test_intersection_two_linked_lists.py +++ b/tests/singly_linked_lists/test_intersection_two_linked_lists.py @@ -1,5 +1,5 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.intersection_two_linked_lists import get_intersection_node +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.intersection_two_linked_lists import get_intersection_node def test_get_intersection_node(): diff --git a/tests/singly_linked_lists/test_intersection_two_linked_lists_with_set.py b/tests/singly_linked_lists/test_intersection_two_linked_lists_with_set.py index 84358e9..131f4ce 100644 --- a/tests/singly_linked_lists/test_intersection_two_linked_lists_with_set.py +++ b/tests/singly_linked_lists/test_intersection_two_linked_lists_with_set.py @@ -1,5 +1,5 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.intersection_two_linked_lists_with_set import ( +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.intersection_two_linked_lists_with_set import ( get_intersection_node_with_set, ) diff --git a/tests/singly_linked_lists/test_linked_list_cycle.py b/tests/singly_linked_lists/test_linked_list_cycle.py index 08bf987..76e3619 100644 --- a/tests/singly_linked_lists/test_linked_list_cycle.py +++ b/tests/singly_linked_lists/test_linked_list_cycle.py @@ -1,5 +1,5 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.linked_list_cycle import has_cycle, has_cycle_with_set +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.linked_list_cycle import has_cycle, has_cycle_with_set def test_has_cycle(): diff --git a/tests/singly_linked_lists/test_merge_k_lists.py b/tests/singly_linked_lists/test_merge_k_lists.py index acc2649..7dd2193 100644 --- a/tests/singly_linked_lists/test_merge_k_lists.py +++ b/tests/singly_linked_lists/test_merge_k_lists.py @@ -1,5 +1,5 @@ -from singly_linked_lists.merge_k_lists import merge_k_lists -from test_helpers.test_helpers import get_list_values, get_singly_linked_list +from src.singly_linked_lists.merge_k_lists import merge_k_lists +from tests.test_helpers.test_helpers import get_list_values, get_singly_linked_list def test_merge_k_lists(): diff --git a/tests/singly_linked_lists/test_merge_two_sorted_lists.py b/tests/singly_linked_lists/test_merge_two_sorted_lists.py index 2685a37..4f5b980 100644 --- a/tests/singly_linked_lists/test_merge_two_sorted_lists.py +++ b/tests/singly_linked_lists/test_merge_two_sorted_lists.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.merge_two_sorted_lists import merge_two_lists -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.merge_two_sorted_lists import merge_two_lists +from tests.test_helpers.test_helpers import get_list_values def test_merge_two_lists(): diff --git a/tests/singly_linked_lists/test_odd_even_linked_list.py b/tests/singly_linked_lists/test_odd_even_linked_list.py index dbbaaea..de4bc3a 100644 --- a/tests/singly_linked_lists/test_odd_even_linked_list.py +++ b/tests/singly_linked_lists/test_odd_even_linked_list.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.odd_even_linked_list import odd_even_list -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.odd_even_linked_list import odd_even_list +from tests.test_helpers.test_helpers import get_list_values def test_odd_even_linked_list(): diff --git a/tests/singly_linked_lists/test_palindrome_linked_list.py b/tests/singly_linked_lists/test_palindrome_linked_list.py index b4b85b0..93a2233 100644 --- a/tests/singly_linked_lists/test_palindrome_linked_list.py +++ b/tests/singly_linked_lists/test_palindrome_linked_list.py @@ -1,5 +1,5 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.palindrome_linked_list import is_palindrome +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.palindrome_linked_list import is_palindrome def test_is_palindrome(): diff --git a/tests/singly_linked_lists/test_remove_linked_list_elements.py b/tests/singly_linked_lists/test_remove_linked_list_elements.py index 5583206..6e66ec1 100644 --- a/tests/singly_linked_lists/test_remove_linked_list_elements.py +++ b/tests/singly_linked_lists/test_remove_linked_list_elements.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.remove_linked_list_elements import remove_elements -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.remove_linked_list_elements import remove_elements +from tests.test_helpers.test_helpers import get_list_values def test_remove_elements(): diff --git a/tests/singly_linked_lists/test_remove_nth_node_from_list.py b/tests/singly_linked_lists/test_remove_nth_node_from_list.py index 0eea15e..4bb3c89 100644 --- a/tests/singly_linked_lists/test_remove_nth_node_from_list.py +++ b/tests/singly_linked_lists/test_remove_nth_node_from_list.py @@ -1,5 +1,5 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.remove_nth_node_from_list import remove_nth_from_end +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.remove_nth_node_from_list import remove_nth_from_end def test_remove_nth_from_end(): diff --git a/tests/singly_linked_lists/test_reverse_linked_list.py b/tests/singly_linked_lists/test_reverse_linked_list.py index f2ea638..2a69955 100644 --- a/tests/singly_linked_lists/test_reverse_linked_list.py +++ b/tests/singly_linked_lists/test_reverse_linked_list.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.reverse_linked_list import reverse_linked_list -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.reverse_linked_list import reverse_linked_list +from tests.test_helpers.test_helpers import get_list_values def test_reverse_linked_list(): diff --git a/tests/singly_linked_lists/test_reverse_linked_list_recursive.py b/tests/singly_linked_lists/test_reverse_linked_list_recursive.py index d516dd6..f5ffcc1 100644 --- a/tests/singly_linked_lists/test_reverse_linked_list_recursive.py +++ b/tests/singly_linked_lists/test_reverse_linked_list_recursive.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.reverse_linked_list_recursive import reverse_linked_list_recursive -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.reverse_linked_list_recursive import reverse_linked_list_recursive +from tests.test_helpers.test_helpers import get_list_values def test_reverse_linked_list(): diff --git a/tests/singly_linked_lists/test_rotate_list.py b/tests/singly_linked_lists/test_rotate_list.py index 933b111..5ad254e 100644 --- a/tests/singly_linked_lists/test_rotate_list.py +++ b/tests/singly_linked_lists/test_rotate_list.py @@ -1,6 +1,6 @@ -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from singly_linked_lists.rotate_list import rotate_list -from test_helpers.test_helpers import get_list_values +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.singly_linked_lists.rotate_list import rotate_list +from tests.test_helpers.test_helpers import get_list_values def test_rotate_list(): diff --git a/tests/stacks/test_daily_temperatures.py b/tests/stacks/test_daily_temperatures.py index b2271fe..16fa90f 100644 --- a/tests/stacks/test_daily_temperatures.py +++ b/tests/stacks/test_daily_temperatures.py @@ -1,4 +1,4 @@ -from stacks.daily_temperatures import daily_temperatures, daily_temperatures_brute_force +from src.stacks.daily_temperatures import daily_temperatures, daily_temperatures_brute_force def test_daily_temperatures_brute_force(): diff --git a/tests/stacks/test_decode_string.py b/tests/stacks/test_decode_string.py index 6c63b62..4867126 100644 --- a/tests/stacks/test_decode_string.py +++ b/tests/stacks/test_decode_string.py @@ -1,4 +1,4 @@ -from stacks.decode_string import decode_string +from src.stacks.decode_string import decode_string def test_decode_string(): diff --git a/tests/stacks/test_min_stack.py b/tests/stacks/test_min_stack.py index 6bd93d5..0c58af3 100644 --- a/tests/stacks/test_min_stack.py +++ b/tests/stacks/test_min_stack.py @@ -1,4 +1,4 @@ -from stacks.min_stack import MinStack +from src.stacks.min_stack import MinStack def test_min_stack(): diff --git a/tests/stacks/test_polish_notation.py b/tests/stacks/test_polish_notation.py index 2c7e31f..b02be3f 100644 --- a/tests/stacks/test_polish_notation.py +++ b/tests/stacks/test_polish_notation.py @@ -1,4 +1,4 @@ -from stacks.polish_notation import evaluate_rpn +from src.stacks.polish_notation import evaluate_rpn def test_evaluate_reverse_polish_notation(): diff --git a/tests/stacks/test_roman_to_integer.py b/tests/stacks/test_roman_to_integer.py index 617ff74..ae07e2b 100644 --- a/tests/stacks/test_roman_to_integer.py +++ b/tests/stacks/test_roman_to_integer.py @@ -1,4 +1,4 @@ -from stacks.roman_to_integer import roman_to_integer +from src.stacks.roman_to_integer import roman_to_integer def test_roman_to_integer(): diff --git a/tests/stacks/test_stack_with_queue.py b/tests/stacks/test_stack_with_queue.py index d1bbdbc..dbeac87 100644 --- a/tests/stacks/test_stack_with_queue.py +++ b/tests/stacks/test_stack_with_queue.py @@ -1,4 +1,4 @@ -from stacks.stack_with_queue import Stack +from src.stacks.stack_with_queue import Stack def test_stack_with_queue(): diff --git a/tests/stacks/test_valid_parentheses.py b/tests/stacks/test_valid_parentheses.py index 7293157..09c2816 100644 --- a/tests/stacks/test_valid_parentheses.py +++ b/tests/stacks/test_valid_parentheses.py @@ -1,4 +1,4 @@ -from stacks.valid_parentheses import valid_parentheses +from src.stacks.valid_parentheses import valid_parentheses def test_valid_parentheses(): diff --git a/tests/strings/palindrome_permutation.py b/tests/strings/palindrome_permutation.py index 1d917ca..9bb7dd3 100644 --- a/tests/strings/palindrome_permutation.py +++ b/tests/strings/palindrome_permutation.py @@ -1,4 +1,4 @@ -from strings.palindrome_permutation import palindrome_permutation +from src.strings.palindrome_permutation import palindrome_permutation def test_palindrome_permutation(): diff --git a/tests/strings/test_add_binary.py b/tests/strings/test_add_binary.py index 7858bfa..018b039 100644 --- a/tests/strings/test_add_binary.py +++ b/tests/strings/test_add_binary.py @@ -1,4 +1,4 @@ -from strings.add_binary import add_binary, add_binary_with_builtins +from src.strings.add_binary import add_binary, add_binary_with_builtins def test_add_binary(): diff --git a/tests/strings/test_anagram.py b/tests/strings/test_anagram.py index 1aa5796..b92781a 100644 --- a/tests/strings/test_anagram.py +++ b/tests/strings/test_anagram.py @@ -1,4 +1,4 @@ -from strings.anagram import valid_anagram +from src.strings.anagram import valid_anagram def test_valid_anagram(): diff --git a/tests/strings/test_crop_string.py b/tests/strings/test_crop_string.py index fea00b5..a06c342 100644 --- a/tests/strings/test_crop_string.py +++ b/tests/strings/test_crop_string.py @@ -1,4 +1,4 @@ -from strings.crop_string import crop_string +from src.strings.crop_string import crop_string def test_crop_string(): diff --git a/tests/strings/test_first_unique_character_in_str.py b/tests/strings/test_first_unique_character_in_str.py index c33889f..5992317 100644 --- a/tests/strings/test_first_unique_character_in_str.py +++ b/tests/strings/test_first_unique_character_in_str.py @@ -1,4 +1,4 @@ -from strings.first_unique_character_in_str import first_unique_character_in_str +from src.strings.first_unique_character_in_str import first_unique_character_in_str def test_first_unique_character(): diff --git a/tests/strings/test_group_anagrams.py b/tests/strings/test_group_anagrams.py index 32faf36..0d8edc1 100644 --- a/tests/strings/test_group_anagrams.py +++ b/tests/strings/test_group_anagrams.py @@ -1,4 +1,4 @@ -from strings.group_anagrams import group_anagrams +from src.strings.group_anagrams import group_anagrams def test_group_anagrams(): diff --git a/tests/strings/test_implement_str_str.py b/tests/strings/test_implement_str_str.py index 170e9e0..087aec3 100644 --- a/tests/strings/test_implement_str_str.py +++ b/tests/strings/test_implement_str_str.py @@ -1,4 +1,4 @@ -from strings.implement_str_str import str_str +from src.strings.implement_str_str import str_str def test_str_str(): diff --git a/tests/strings/test_jewels_and_stones.py b/tests/strings/test_jewels_and_stones.py index 75fe861..801015d 100644 --- a/tests/strings/test_jewels_and_stones.py +++ b/tests/strings/test_jewels_and_stones.py @@ -1,4 +1,4 @@ -from strings.jewels_and_stones import jewels_and_stones +from src.strings.jewels_and_stones import jewels_and_stones def test_jewels_and_stones(): diff --git a/tests/strings/test_license_key_formatter.py b/tests/strings/test_license_key_formatter.py index 902342e..9d44c30 100644 --- a/tests/strings/test_license_key_formatter.py +++ b/tests/strings/test_license_key_formatter.py @@ -1,4 +1,4 @@ -from strings.license_key_formatter import license_key_formatter +from src.strings.license_key_formatter import license_key_formatter def test_license_key_formatter(): diff --git a/tests/strings/test_longest_common_prefix.py b/tests/strings/test_longest_common_prefix.py index a830be7..52a32f5 100644 --- a/tests/strings/test_longest_common_prefix.py +++ b/tests/strings/test_longest_common_prefix.py @@ -1,4 +1,4 @@ -from strings.longest_common_prefix import ( +from src.strings.longest_common_prefix import ( longest_common_prefix_horizontal, longest_common_prefix_vertical, ) diff --git a/tests/strings/test_longest_substring_without_duplicates.py b/tests/strings/test_longest_substring_without_duplicates.py index cfff4b2..396d66c 100644 --- a/tests/strings/test_longest_substring_without_duplicates.py +++ b/tests/strings/test_longest_substring_without_duplicates.py @@ -1,4 +1,4 @@ -from strings.longest_substring_without_duplicates import longest_substring_without_duplicates +from src.strings.longest_substring_without_duplicates import longest_substring_without_duplicates def test_longest_substring_without_duplicates(): diff --git a/tests/strings/test_multiply_strings.py b/tests/strings/test_multiply_strings.py index afea7d1..75eeddc 100644 --- a/tests/strings/test_multiply_strings.py +++ b/tests/strings/test_multiply_strings.py @@ -1,4 +1,4 @@ -from strings.multiply_strings import multiply_strings +from src.strings.multiply_strings import multiply_strings def test_multiply_strings(): diff --git a/tests/strings/test_palindrome.py b/tests/strings/test_palindrome.py index 30259a5..4dca977 100644 --- a/tests/strings/test_palindrome.py +++ b/tests/strings/test_palindrome.py @@ -1,4 +1,4 @@ -from strings.palindrome import valid_palindrome, valid_palindrome_naive +from src.strings.palindrome import valid_palindrome, valid_palindrome_naive def test_valid_palindrome_naive(): diff --git a/tests/strings/test_pangram.py b/tests/strings/test_pangram.py index db68f13..38d655f 100644 --- a/tests/strings/test_pangram.py +++ b/tests/strings/test_pangram.py @@ -1,4 +1,4 @@ -from strings.pangram import pangram +from src.strings.pangram import pangram def test_pangram(): diff --git a/tests/strings/test_reverse_string.py b/tests/strings/test_reverse_string.py index 2f098ef..6fb8734 100644 --- a/tests/strings/test_reverse_string.py +++ b/tests/strings/test_reverse_string.py @@ -1,4 +1,4 @@ -from strings.reverse_string import ( +from src.strings.reverse_string import ( reverse_string, reverse_string_in_place, reverse_string_with_list_comprehension, diff --git a/tests/strings/test_reverse_words.py b/tests/strings/test_reverse_words.py index 2665980..00d4524 100644 --- a/tests/strings/test_reverse_words.py +++ b/tests/strings/test_reverse_words.py @@ -1,4 +1,4 @@ -from strings.reverse_words import reverse_words +from src.strings.reverse_words import reverse_words def test_reverse_words(): diff --git a/tests/strings/test_reverse_words_ii.py b/tests/strings/test_reverse_words_ii.py index fbb09b8..0e9854e 100644 --- a/tests/strings/test_reverse_words_ii.py +++ b/tests/strings/test_reverse_words_ii.py @@ -1,4 +1,4 @@ -from strings.reverse_words_ii import reverse_words_ii +from src.strings.reverse_words_ii import reverse_words_ii def test_reverse_words_ii(): diff --git a/tests/strings/test_run_length_encoding.py b/tests/strings/test_run_length_encoding.py index 4d7d983..d84c4bb 100644 --- a/tests/strings/test_run_length_encoding.py +++ b/tests/strings/test_run_length_encoding.py @@ -1,4 +1,4 @@ -from strings.run_length_encoding import run_length_encoding +from src.strings.run_length_encoding import run_length_encoding def test_run_length_encoding(): diff --git a/tests/strings/test_string_to_integer.py b/tests/strings/test_string_to_integer.py index 431f24d..7bddc90 100644 --- a/tests/strings/test_string_to_integer.py +++ b/tests/strings/test_string_to_integer.py @@ -1,4 +1,4 @@ -from strings.string_to_integer import string_to_integer +from src.strings.string_to_integer import string_to_integer def test_string_to_integer(): diff --git a/tests/strings/test_string_to_integer_ii.py b/tests/strings/test_string_to_integer_ii.py index 4a0eb17..fed82c4 100644 --- a/tests/strings/test_string_to_integer_ii.py +++ b/tests/strings/test_string_to_integer_ii.py @@ -1,4 +1,4 @@ -from strings.string_to_integer_ii import string_to_integer_ii +from src.strings.string_to_integer_ii import string_to_integer_ii def test_string_to_integer_ii(): diff --git a/tests/strings/test_unique_emails.py b/tests/strings/test_unique_emails.py index 51ee360..e1bbf30 100644 --- a/tests/strings/test_unique_emails.py +++ b/tests/strings/test_unique_emails.py @@ -1,4 +1,4 @@ -from strings.unique_emails import unique_email_addresses +from src.strings.unique_emails import unique_email_addresses def test_unique_email_addresses(): diff --git a/tests/strings/test_valid_word_abbreviation.py b/tests/strings/test_valid_word_abbreviation.py index 517ff32..34481df 100644 --- a/tests/strings/test_valid_word_abbreviation.py +++ b/tests/strings/test_valid_word_abbreviation.py @@ -1,4 +1,4 @@ -from strings.valid_word_abbreviation import valid_word_abbreviation +from src.strings.valid_word_abbreviation import valid_word_abbreviation def test_valid_word_abbreviation(): diff --git a/trie/__init__.py b/tests/test_helpers/__init__.py similarity index 100% rename from trie/__init__.py rename to tests/test_helpers/__init__.py diff --git a/test_helpers/test_helpers.py b/tests/test_helpers/test_helpers.py similarity index 93% rename from test_helpers/test_helpers.py rename to tests/test_helpers/test_helpers.py index 0a79b23..40097fd 100644 --- a/test_helpers/test_helpers.py +++ b/tests/test_helpers/test_helpers.py @@ -1,8 +1,8 @@ from collections import deque -from binary_tree.tree_node import TreeNode -from data_structures.singly_linked_list_node import SinglyLinkedListNode -from n_ary_tree.nary_tree_node import NaryTreeNode +from src.binary_tree.tree_node import TreeNode +from src.data_structures.singly_linked_list_node import SinglyLinkedListNode +from src.n_ary_tree.nary_tree_node import NaryTreeNode def get_binary_search_tree(): diff --git a/tests/trie/test_map_sum.py b/tests/trie/test_map_sum.py index 0d10edb..89fbf17 100644 --- a/tests/trie/test_map_sum.py +++ b/tests/trie/test_map_sum.py @@ -1,4 +1,4 @@ -from trie.map_sum import MapSum +from src.trie.map_sum import MapSum def test_map_sum(): diff --git a/tests/trie/test_replace_words.py b/tests/trie/test_replace_words.py index 3a7a13d..54b5dfa 100644 --- a/tests/trie/test_replace_words.py +++ b/tests/trie/test_replace_words.py @@ -1,4 +1,4 @@ -from trie.replace_words import replace_words +from src.trie.replace_words import replace_words def test_replace_words():