This question evaluates understanding of contiguous subarray-sum problems, algorithmic techniques for linear-time and constant-extra-space solutions, and the ability to reason about correctness and edge cases such as zeros, negative numbers, and large inputs.

Given an integer array nums and an integer target, implement: (