Skip to content

Commit bc8df6d

Browse files
authoredMar 13, 2024
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](astral-sh/ruff-pre-commit@v0.2.2...v0.3.2) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 5f95d6f commit bc8df6d

File tree

297 files changed

+498
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+498
-295
lines changed
 

Diff for: ‎.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: auto-walrus
1717

1818
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.2.2
19+
rev: v0.3.2
2020
hooks:
2121
- id: ruff
2222
- id: ruff-format
@@ -47,7 +47,7 @@ repos:
4747
- id: validate-pyproject
4848

4949
- repo: https://github.com/pre-commit/mirrors-mypy
50-
rev: v1.8.0
50+
rev: v1.9.0
5151
hooks:
5252
- id: mypy
5353
args:

Diff for: ‎backtracking/all_combinations.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
2-
In this problem, we want to determine all possible combinations of k
3-
numbers out of 1 ... n. We use backtracking to solve this problem.
2+
In this problem, we want to determine all possible combinations of k
3+
numbers out of 1 ... n. We use backtracking to solve this problem.
44
5-
Time complexity: O(C(n,k)) which is O(n choose k) = O((n!/(k! * (n - k)!))),
5+
Time complexity: O(C(n,k)) which is O(n choose k) = O((n!/(k! * (n - k)!))),
66
"""
7+
78
from __future__ import annotations
89

910
from itertools import combinations

0 commit comments

Comments
 (0)