Sonata Software Online Assessment | Longest Subarray With Sum K & Container With Most Water

Question · Posted Jun 2026

Problem 1 - Retail Transaction Stream Auditor Problem Statement You are working on an internal audit engine for an e-commerce platform. The system ingests an array of integers transactionDeltas of size N, capturing the net financial variance of successive product orders. You are also given an integer targetSum. Your task is to find the maximum length of a contiguous subarray within transactionDeltas whose elements add up to exactly targetSum. If no such contiguous segment exists, return 0. Constraints Constraint 1 ...

The full answer & interview discussion are available to premium members.

Log in Create a free account