CodingReported in a candidate post, Aug 2022
Find subarray with sum equal to K
Filed under Ivanti
The question
Given an array, find a subarray whose sum equals K. Return the start and end indices of that subarray, or -1 if no such subarray exists.
No write-up yet. Related questions below have one.
Related Ivanti questions
Collected from public candidate posts and coding forums. Updated Nov 2026.