Longest Subarray Summing to Target
CodingPhoneSoftware EngineerReported Aug, 2026
Company question banks are included with the Insider plan.
Given an integer array nums and an integer target, return the length of the longest contiguous subarray whose elements sum to exactly target. If no such subarray exists, return 0.
The...