diff --git a/dynamic_programming/longest_arithmetic_subsequence.py b/dynamic_programming/longest_arithmetic_subsequence.py index dfa061f18..6b6987103 100644 --- a/dynamic_programming/longest_arithmetic_subsequence.py +++ b/dynamic_programming/longest_arithmetic_subsequence.py @@ -1,11 +1,11 @@ """ -Longest Arithmetic Subsequence Problem: Given an array nums of integers, +Longest Arithmetic Subsequence Problem: Given an array nums of integers, return the length of the longest arithmetic subsequence in nums. Note that: -- A subsequence is an array that can be derived from another array by +- A subsequence is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements. -- A sequence seq is arithmetic if seq[i + 1] - seq[i] are all the same value +- A sequence seq is arithmetic if seq[i + 1] - seq[i] are all the same value (for 0 <= i < seq.length - 1). """