Which Ones Slide

Each statement below describes a query over an array of integers. More than one admits a correct linear two-pointer or sliding-window solution. Select every one that does.

A

Longest contiguous subarray containing at most 3 distinct values

B

The contiguous subarray with the largest sum, values may be negative

C

Longest contiguous subarray with sum at most TT, given that every value is positive

D

Given a sorted array, decide whether two elements sum to XX

E

Longest contiguous subarray with sum at most TT, values may be negative