Answer: Zensar Technologies OA 2025 | Retail POS Transaction Matching & Cloud Compute Bu
Answer · Posted Jun 2026
Solution 1 - Retail POS Transaction Matching Approach Since the array is already sorted, we can solve the problem using the Two Pointer technique. Initialize one pointer at the beginning and another at the end. Calculate their sum. If the sum equals the target, return the indices. If the sum is smaller, move the left pointer. If the sum is larger, move the right pointer. Code public class RetailPOSTransactionMatching { public int[] locateSettlementPair(int[] transactionAmounts, int targetSettlement) { int left = ...
The full answer & interview discussion are available to premium members.
Log in Create a free account