I don't understand the following definition of a contiguous subsequence:
A contiguous subsequence of a list S is a subsequence made up of consecutive elements of S.
If S is
{5, 15, -30, 10, -5, 40, 10}
then15, -30, 10
is a contiguous subsequence.
What makes 15, -30, 10
a contiguous subsequence?
A contiguous subarray is simply a subarray of an array with a condition that the elements of the subarray should be in exact sequence as the sequence of the elements in the array.
In mathematics, a subsequence of a given sequence is a sequence that can be derived from the given sequence by deleting some or no elements without changing the order of the remaining elements. For example, the sequence is a subsequence of obtained after removal of elements.
In this case, the word "contiguous" is referenced a consecutive numbers in ascending order of the ports in the interfaces and the "comma" separate with another group of consecutive numbers in ascending order of the ports in the interfaces.
1 touching along the side or boundary; in contact. 2 physically adjacent; neighbouring. 3 preceding or following in time.
Lets say you have some elements in a subsequence,
then it will be called contiguous iff the elements taken in order are consecutive in original set.
E.g,
Sequence=2,3,abc,5.6,4,abhishek;
Subsequence=5.6,2,abhishek;
Contiguous Subsequence=3,abc,5.6 or 5.6,4,abhishek or abc,5.6.
Remember, The sequence itself is always a contiguous subsequence.
Hope it makes the concept clear!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With