In an MSCI Risk Analytics data-processing workflow, identify every contiguous range whose combined value matches a specified target. Given an integer array nums and an integer target, return all non-empty subarrays whose elements sum to target.
Return each matching subarray as [start, end], using inclusive zero-based indices. The result must be ordered by increasing end index, and by increasing start index when multiple matches end at the same position. If no subarray matches, return an empty list.
nums, a list of integers, and target, an integer.[start, end] identifies a contiguous subarray whose sum equals target.def find_target_sum_subarrays(nums, target):