Comment by seanhunter
1 day ago
The definition of a subsequence is if you have a(n) as a sequence of real numbers and n_1 < n_2 <n_3 < ... is an increasing sequence of integers then
a(n_1), a(n_2), a(n_3), ... is a subsequence of a_n and is denoted a(n_k).
So the indexes don't need to be contiguous, just increasing.
So in your example 2, 1, 1/2, 1/3, ... is a decreasing subsequence.
edit: changed to using function-style notation because the nested subscript notation looks confusing in ascii
No comments yet
Contribute on Hacker News ↗