mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
@ -6,8 +6,8 @@ into k parts. These two facts together are used for this algorithm.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def partition(m):
|
def partition(m: int) -> int:
|
||||||
memo = [[0 for _ in range(m)] for _ in range(m + 1)]
|
memo: list[list[int]] = [[0 for _ in range(m)] for _ in range(m + 1)]
|
||||||
for i in range(m + 1):
|
for i in range(m + 1):
|
||||||
memo[i][0] = 1
|
memo[i][0] = 1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user