Skip to content

Commit b56b0f9

Browse files
authored
Merge branch 'master' into add_kmeans++
2 parents 2fdb210 + a71618f commit b56b0f9

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
ci:
2+
autoupdate_schedule: monthly
3+
14
repos:
25
- repo: https://github.com/pre-commit/pre-commit-hooks
36
rev: v6.0.0
@@ -16,7 +19,7 @@ repos:
1619
- id: auto-walrus
1720

1821
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.13.1
22+
rev: v0.13.2
2023
hooks:
2124
- id: ruff-check
2225
- id: ruff-format

data_structures/arrays/sudoku_solver.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@
1111
def cross(items_a, items_b):
1212
"""
1313
Cross product of elements in A and elements in B.
14+
15+
>>> cross('AB', '12')
16+
['A1', 'A2', 'B1', 'B2']
17+
>>> cross('ABC', '123')
18+
['A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'C1', 'C2', 'C3']
19+
>>> cross('ABC', '1234')
20+
['A1', 'A2', 'A3', 'A4', 'B1', 'B2', 'B3', 'B4', 'C1', 'C2', 'C3', 'C4']
21+
>>> cross('', '12')
22+
[]
23+
>>> cross('A', '')
24+
[]
25+
>>> cross('', '')
26+
[]
1427
"""
1528
return [a + b for a in items_a for b in items_b]
1629

0 commit comments

Comments
 (0)