EDIT:
I get want people are saying. The actual definition of contiguous subarray is any sub series of elements in a given array that are contiguous ie their indices are continuous.
So given [1,2,3,4,5,6]:
[1,2,3], [3,4], [3,4,5,6] are all valid contiguous subarrays. Any algorithm can be used to generate the subarrays.
Personal note:
What was confusing for me was most explanations either use or reference a specific problem or condition set to generate the subarrays. Most don't specifically state there's no direct relationship between the problem and the definition of contiguous subarrays.
For me it's the same as asking:
Q: "What does + do?"
A: "4+4=8"
Me: "OK, so I can only use + with 4, got it."
This is how my brain worked to grok the definition, so hopefully it helps someone else out.
ORIGIONAL ANSWER:
OK from what I've worked out the term "contiguous subarray" is a misnomer.
Subarray = "any part or section of an array"
Contiguous = "data that is moved or stored in a solid uninterrupted block."
But AFAIK "Contiguous" still needs to be qualified by further conditions.
For example this Facebook/Meta test question:
Contiguous Subarrays
You are given an array a of N integers. For each
index i, you are required to determine the number of contiguous
subarrays that fulfills the following conditions:
The value at index i
must be the maximum element in the contiguous subarrays, and These
contiguous subarrays must either start from or end on index i.
Or this LeetCode Example:
Given a binary array nums, return the maximum length of a contiguous
subarray with an equal number of 0 and 1.
So just asking for "contiguous subarray" without the conditions of what makes a subarrary contiguous is invalid.