Substring

maths programming
Substring

Given a sequence $a_1, a_2, \ldots, a_n$ a substring is a sequence of consecutive terms of $a_i$. For example $a_{i+1}, a_{i+2}, \ldots, a_{i + k-1}, a_{i + k}$. The length of the substring is the number of terms it contains, in the example the length would be $k$.