Node.insert ignored values equal to the current node, so
tree_sort([1, 1]) returned (1,). Send equal values to the right subtree and
add doctests for repeated values.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* sorts/tree_sort: use Iterable type hint and enable range doctest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* sorts/tree_sort: fix Iterable support using iter() and next()
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add tests for tree_sort
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update tree_sort.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added Whitespace and Docstring
I modified the file to make Pylint happier and make the code more readable.
* Beautified Code and Added Docstring
I modified the file to make Pylint happier and make the code more readable.
* Added DOCSTRINGS, Wikipedia link, and whitespace
I added DOCSTRINGS and whitespace to make the code more readable and understandable.
* Improved Formatting
* Wrapped comments
* Fixed spelling error for `movement` variable
* Added DOCSTRINGs
* Improved Formatting
* Corrected whitespace to improve readability.
* Added docstrings.
* Made comments fit inside an 80 column layout.
* Adding variable to fade out ambiguity
* More readability on merge sorting algorithm
* Updating merge_sort_fastest description and explaining why
* Adding tests file with imports
* Standardazing filenames and function names
* Adding test cases and test functions
* Adding test loop
* Putting 'user oriented code' inside main condition for having valid imports
* Fixing condition
* Updating tests: adding cases and todo list
* Refactoring first euler problem's first solution