views:

95

answers:

6

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}
then 15, -30, 10 is a contiguous subsequence.

What makes 15, -30, 10 a contiguous subsequence?

+2  A: 

A contiguous subsequence of a list S is a subsequence made up of consecutive elements of S.

NickLarsen
+1  A: 

Uhm, maybe because they are consecutive as per your definition?

Albin Sunnanbo
@Brad, respect everybody here please!
The Elite Gentleman
He's asking for an explanation of the definition -- the definition gives that as an example of a contiguous subsequence and he doesn't understand why it's the case
Michael Mrozek
+4  A: 

The form a subset that are next to each other within the set.

con·tig·u·ous/kənˈtigyo͞oəs/Adjective
1. Sharing a common border; touching.
2. Next or together in sequence. 
Brad
+1  A: 

This is not directly programming related but 15, 30, -15 is a contiguous subsequence because you can find them in the same order inside the given list (without any holes between the elements of course).

Jack
+1  A: 

They are elements of your original array and they are all continous.

A: 

Contiguous elements are consecutive elements.

Kedar Soparkar