Skip to content

Commit 2883a97

Browse files
committed
dp type specified
1 parent 4bd4d1c commit 2883a97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dynamic_programming/longest_arithmetic_subsequence.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def longest_arithmetic_subsequence(nums: list[int]) -> int:
4848
if len(nums) == 1:
4949
return 1
5050

51-
dp = [{} for _ in range(len(nums))]
51+
ddp: list[dict[int, int]] = [{} for _ in range(len(nums))]
5252
max_length = 2
5353

5454
for i in range(len(nums)):

0 commit comments

Comments
 (0)