* Update all_combinations.py
The original implementation had limitations in handling edge cases and certain input parameters, leading to potential RecursionError.
* Update all_combinations.py
Added checks to handle cases where n or k are negative or where k is greater than n. In such scenarios, the function now returns an empty list, avoiding invalid recursive calls.
* Update error handling
Added checks to handle cases where `n` or `k` are negative or where `k` is greater than `n`. In such scenarios, the function now returns an empty list, avoiding invalid recursive calls.
* Update backtracking/all_combinations.py
* Update all_combinations.py
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added static typing to backtracking algorithms
* Ran psf/black to fix some minor issues.
* updating DIRECTORY.md
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>