Skip to content

Tree_sort.py: Disable slow doctest #10584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions DIRECTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@
* [Longest Increasing Subsequence](dynamic_programming/longest_increasing_subsequence.py)
* [Longest Increasing Subsequence O(Nlogn)](dynamic_programming/longest_increasing_subsequence_o(nlogn).py)
* [Longest Palindromic Subsequence](dynamic_programming/longest_palindromic_subsequence.py)
* [Longest Sub Array](dynamic_programming/longest_sub_array.py)
* [Matrix Chain Multiplication](dynamic_programming/matrix_chain_multiplication.py)
* [Matrix Chain Order](dynamic_programming/matrix_chain_order.py)
* [Max Non Adjacent Sum](dynamic_programming/max_non_adjacent_sum.py)
Expand Down Expand Up @@ -486,6 +485,7 @@
* [Fractional Knapsack](greedy_methods/fractional_knapsack.py)
* [Fractional Knapsack 2](greedy_methods/fractional_knapsack_2.py)
* [Gas Station](greedy_methods/gas_station.py)
* [Minimum Coin Change](greedy_methods/minimum_coin_change.py)
* [Minimum Waiting Time](greedy_methods/minimum_waiting_time.py)
* [Optimal Merge Pattern](greedy_methods/optimal_merge_pattern.py)

Expand Down Expand Up @@ -618,7 +618,6 @@
* [Gcd Of N Numbers](maths/gcd_of_n_numbers.py)
* [Germain Primes](maths/germain_primes.py)
* [Greatest Common Divisor](maths/greatest_common_divisor.py)
* [Greedy Coin Change](maths/greedy_coin_change.py)
* [Hamming Numbers](maths/hamming_numbers.py)
* [Hardy Ramanujanalgo](maths/hardy_ramanujanalgo.py)
* [Harshad Numbers](maths/harshad_numbers.py)
Expand Down
5 changes: 3 additions & 2 deletions sorts/tree_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def tree_sort(arr: list[int]) -> tuple[int, ...]:
(-4, 2, 5, 7, 9)
>>> tree_sort([5, 6, 1, -1, 4, 37, 2, 7])
(-1, 1, 2, 4, 5, 6, 7, 37)
>>> tree_sort(range(10, -10, -1)) == tuple(sorted(range(10, -10, -1)))
True

# >>> tree_sort(range(10, -10, -1)) == tuple(sorted(range(10, -10, -1)))
# True
"""
if len(arr) == 0:
return tuple(arr)
Expand Down