From 2883a97b31bf31492b013fde9cc04a65a2a8688d Mon Sep 17 00:00:00 2001 From: Tejaswi Tyagi <98461855+tejaswi0910@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:11:48 +0000 Subject: [PATCH] dp type specified --- dynamic_programming/longest_arithmetic_subsequence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dynamic_programming/longest_arithmetic_subsequence.py b/dynamic_programming/longest_arithmetic_subsequence.py index 6b6987103..f7d0160bf 100644 --- a/dynamic_programming/longest_arithmetic_subsequence.py +++ b/dynamic_programming/longest_arithmetic_subsequence.py @@ -48,7 +48,7 @@ def longest_arithmetic_subsequence(nums: list[int]) -> int: if len(nums) == 1: return 1 - dp = [{} for _ in range(len(nums))] + ddp: list[dict[int, int]] = [{} for _ in range(len(nums))] max_length = 2 for i in range(len(nums)):