* updating DIRECTORY.md
* Clarify wording in PR template
* Clarify CONTRIBUTING.md wording about adding issue numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add suggested change from review to CONTRIBUTING.md
Co-authored-by: Christian Clauss <cclauss@me.com>
* Incorporate review edit to CONTRIBUTING.md
Co-authored-by: Christian Clauss <cclauss@me.com>
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
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 minimum waiting time problem solution using greedy algorithm
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ruff --fix
* Add type hints
* Added two more doc test
* Removed unnecessary comments
* updated type hints
* Updated the code as per the code review
* Added recursive algo to calculate product sum from an array
* Added recursive algo to calculate product sum from an array
* Update doc string
* Added doctest for product_sum function
* Updated the code and added more doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added more test coverage for product_sum method
* Update product_sum.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>
* updating DIRECTORY.md
* feat: Count negative numbers in sorted matrix
* updating DIRECTORY.md
* chore: Fix pre-commit
* refactor: Combine functions into iteration
* style: Reformat reference
* feat: Add timings of each implementation
* chore: Fix problems with algorithms-keeper bot
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* test: Remove doctest from benchmark function
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/count_negative_numbers_in_sorted_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* refactor: Use sum instead of large iteration
* refactor: Use len not sum
* Update count_negative_numbers_in_sorted_matrix.py
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
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 minimum waiting time problem solution using greedy algorithm
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ruff --fix
* Add type hints
* Added two more doc test
* Removed unnecessary comments
* updated type hints
* Updated the code as per the code review
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Solving the `Top k most frequent words` problem using a max-heap
* Mentioning Python standard library solution in `Top k most frequent words` docstring
* ruff --fix .
* updating DIRECTORY.md
---------
Co-authored-by: Amos Paribocci <aparibocci@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Add type hints to md5.py
* Rename some vars to snake case
* Specify functions imported from math
* Rename vars and functions to be more descriptive
* Make tests from test function into doctests
* Clarify more var names
* Refactor some MD5 code into preprocess function
* Simplify loop indices in get_block_words
* Add more detailed comments, docs, and doctests
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Add type hints to md5.py
* Rename some vars to snake case
* Specify functions imported from math
* Rename vars and functions to be more descriptive
* Make tests from test function into doctests
* Clarify more var names
* Refactor some MD5 code into preprocess function
* Simplify loop indices in get_block_words
* Add more detailed comments, docs, and doctests
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Convert str types to bytes
* Add tests comparing md5_me to hashlib's md5
* Replace line-break backslashes with parentheses
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Remove python_version < "3.11" for tensorflow
* Reenable neural_network/input_data.py_tf
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try to fix ruff
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try to fix ruff
* Try to fix ruff
* Try to fix ruff
* Try to fix pre-commit
* Try to fix
* Fix
* Fix
* Reenable dynamic_programming/k_means_clustering_tensorflow.py_tf
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try to fix ruff
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* updating DIRECTORY.md
* Fix mypy errors in lorentz_transformation_four_vector.py
* Remove unused symbol vars
* Add function documentation and rewrite algorithm explanation
Previous explanation was misleading, as the code only calculates Lorentz
transformations for movement in the x direction (0 velocity in the y and
z directions) and not movement in any direction
* updating DIRECTORY.md
* Update error message for speed
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* updating DIRECTORY.md
* Format local_weighted_learning.py doctests for clarity
* Refactor local_weighted_learning.py to use np.array instead of np.mat
The np.matrix class is planned to be eventually depreciated in favor of
np.array, and current use of the class raises warnings in pytest
* Update local_weighted_learning.py documentation
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* add backtracking word search
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* review notes fixes
* additional fixes
* add tests
* small cleanup
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* small cleanup 2
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update backtracking/word_search.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* add prefix sum
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Refactor bottom-up function to be class method
* Add type hints
* Update convolve function namespace
* Remove depreciated np.float
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Renamed function for consistency
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Adopt Python >= 3.8 assignment expressions using auto-walrus
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: Binary tree node sum (#7020)
* feat: Sum of all nodes in binary tree explanation (#7020)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update data_structures/binary_tree/binary_tree_node_sum.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* refactor: Change replace method with `__iter__` overriding (#7020)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Binary Search Tree Inorder Traversal
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Binary Search Tree Inorder Traversal v2
* Binary Search Tree Inorder Traversal
* Binary Search Tree Inorder Traversal
* Update inorder_tree_traversal_2022.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update inorder_tree_traversal_2022.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update inorder_tree_traversal_2022.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update data_structures/binary_tree/inorder_tree_traversal_2022.py
* Update data_structures/binary_tree/inorder_tree_traversal_2022.py
* Updated
* Updated
* Update inorder_tree_traversal_2022.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update inorder_tree_traversal_2022.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update data_structures/binary_tree/inorder_tree_traversal_2022.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Updated and removed print statement
removed the print from inorder function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add Catalan number to maths
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* renames prime functions and occurances in comments
* changes implementation of primality testing to be uniform
* adds static typing as per conventions
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Get rid of the Union
* updating DIRECTORY.md
* Get rid of the Union
* Remove the redundant pre-commit runs.
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added average absolute deviation
* Formats program with black
* reruns updated pre commit
* Update average_absolute_deviation.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* The black formatter is no longer beta
* pre-commit autoupdate
* pre-commit autoupdate
* Remove project_euler/problem_145 which is killing our CI tests
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>