solulubeta
Sign in
DSA Basics / Exam level
03.02 · Problem

Counting the Balanced Shifts

Hard Prefix sums in a hash map Pro

This problem is part of solulu Pro

A machine's log holds, for each hour, how much it gained or lost (a loss is negative). The engineer wants to know how many continuous stretches of hours add up to exactly target — the stretches may overlap and a single…

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 67 of 90 · updated 2026-10-12