From 3acca3d1d188f89c6aa0fb4c0139ac62426ea296 Mon Sep 17 00:00:00 2001 From: Aswin Murali Date: Mon, 30 Aug 2021 13:36:59 +0530 Subject: [PATCH] Fix type annotations for integer_partition.py #4052 (#4689) --- dynamic_programming/integer_partition.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamic_programming/integer_partition.py b/dynamic_programming/integer_partition.py index 4eb06348ce84..8ed2e51bd4bd 100644 --- a/dynamic_programming/integer_partition.py +++ b/dynamic_programming/integer_partition.py @@ -6,8 +6,8 @@ """ -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