mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-20 12:47:35 +00:00
dp type specified
This commit is contained in:
parent
4bd4d1cff6
commit
2883a97b31
@ -48,7 +48,7 @@ def longest_arithmetic_subsequence(nums: list[int]) -> int:
|
|||||||
if len(nums) == 1:
|
if len(nums) == 1:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
dp = [{} for _ in range(len(nums))]
|
ddp: list[dict[int, int]] = [{} for _ in range(len(nums))]
|
||||||
max_length = 2
|
max_length = 2
|
||||||
|
|
||||||
for i in range(len(nums)):
|
for i in range(len(nums)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user