This question evaluates proficiency in data structures and algorithms, focusing on array processing, aggregation for computing per-user balances, and handling mutable range-sum queries.
Given a list of transactions where each transaction has a userId and an amount (positive for credit, negative for debit), compute the final balance for every userId. LeetCode 209. Minimum Size Subarray Sum – Given an array of positive integers nums and an integer target, return the minimal length of a contiguous subarray whose sum is at least target; return 0 if none exists. LeetCode 307. Range Sum Query – Mutable – Design a data structure that supports point updates and range-sum queries on an integer array.
https://leetcode.com/problems/minimum-size-subarray-sum/description/ https://leetcode.com/problems/range-sum-query-mutable/description/