Infosys SP / DSE OA 2025 | Subarray Sum Equals K & Container With Most Water
Infosys · Question · Posted Jun 2026
Problem 1 - Enterprise Microservice Hash Stream Problem Statement You are building an API rate-limiting guard for a security microservice. The system receives an integer array packetHashes and an integer targetSum. Your task is to find the total number of contiguous subarrays whose sum is exactly equal to targetSum. Return the total count of such subarrays. Constraints Constraint 1 ≤ N ≤ 50000 -1000 ≤ packetHashes[i] ≤ 1000 -107 ≤ targetSum ≤ 107 Test Case Input Output packetHashes = [1,1,1] ...
The full answer & interview discussion are available to premium members.
Log in Create a free account