Search
⌘K

Leetcode 3284. Sum of Consecutive Subarrays

Given an array of integers and a target value, find or count contiguous (consecutive) subarrays whose sum equals the target. The core challenge is to do this efficiently — use prefix sums with a hashmap to handle negative values (or a sliding-window for nonnegative arrays).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.