DIY: Find Two Non-Overlapping Subarrays Each with Target Sum
Solve the interview question "Find Two Non-Overlapping Subarrays Each with Target Sum" yourself in this lesson.
Problem statement
In this challenge, you are given an array of integers named arr
and an integer named target
.
Your task is to find two non-overlapping subarrays in arr
such that both subarrays ...