Leetcode 1477. Find Two Non-overlapping Sub-arrays Each With Target Sum
Find two non-overlapping subarrays of positive integers that each sum to target and return the minimum possible total length of those two subarrays (or -1 if none exist). Because all elements are positive, the problem reduces to locating target-sum windows and combining the best left/right choices using linear scans.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.