mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 16:27:02 +00:00
parent
8e5c3536c7
commit
3acca3d1d1
|
@ -6,8 +6,8 @@ into k parts. These two facts together are used for this algorithm.
|
|||
"""
|
||||
|
||||
|
||||
def partition(m):
|
||||
memo = [[0 for _ in range(m)] for _ in range(m + 1)]
|
||||
def partition(m: int) -> int:
|
||||
memo: list[list[int]] = [[0 for _ in range(m)] for _ in range(m + 1)]
|
||||
for i in range(m + 1):
|
||||
memo[i][0] = 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user