solulubeta
Sign in
Story Problems / Arrays, windows & two pointers
01.07 · Problem

Transactions That Add Up

Medium Prefix sum + hash map Pro

This problem is part of solulu Pro

A shop's ledger lists daily net cash changes (positive for income, negative for expense). The auditor wants to know in how many ways a continuous run of days can have a total change of exactly k. Count such runs.

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 7 of 94 · updated 2026-10-12