Fidelity | OA | Prefix Sums & Hash Maps | July 25th Assessment | Sub-array Pairs Target Sum
Question · Posted Apr 2026
Sub-array Pairs Target Sum Problem Statement: You are given two arrays of positive integers, firstArray and secondArray, as well as an integer target. Your task is to find the number of pairs of non-empty sub-arrays — one from firstArray and one from secondArray — such that the total sum of numbers in them is equal to target. Formally, your task is to find the number of tuples of integers (i, j, n, m), where 1 <= n < firstArray.length, 0 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account