Apple logoApple
Coding·45 minMembers

Subarray Sum Equals K

Members only

Given an integer array and target `k`, count all contiguous subarrays whose sum equals `k`. The follow-up checks whether negative numbers break sliding-window assumptions.

SWE
array
prefix-sum
hashmap
medium
Frequency
Single report
Last asked
2026-01-29
Stage
phone-screen

Log in to continue reading the full content