Shikhar·Jul 24Subarray sum equal to KThe first approach that comes to mind is to generate every subarray in O(n²) and, for each subarray, calculate its sum in O(n). If the sum…
Minoltan Issack·Apr 7How a Garage Rope Taught Me the Most Important LeetCode Pattern: Subarray SumThe O(n) trick behind one of the most-asked coding interview questions, explained with a rope and a notebook
Neha Gupta·Oct 10, 2025Day 2 of 60 Days of DSA: Subarray with Given Sum & Subarray with Least AverageLearn how to calculate subarray sums problems — from brute force to prefix sums.
InDev SimplifiedbyNeha Gupta·Aug 29Day 1 of 60 Days of DSA: Subarray Sums & Range QueriesLearn how to calculate subarray sums efficiently — from brute force to prefix sums.A response icon1A response icon1
Aditya Sharma·Jul 3, 2025Subarray Sum Equals KThe goal is to determine how many contiguous subarrays within the given array nums have a sum equal to k.
Yarik Mir·Mar 28, 2025🚀 Subarray Sum Equals K (Medium) (12/100)Problem: Given an array nums and integer k, return the count of contiguous subarrays that sum to k.
Rayani Surya Vardhan·Dec 31, 2024Subarray Sum Equals kThis code is an implementation of a solution to find the number of contiguous subarrays in an array of integers that add up to a target…
InLevel Up CodingbySugavasilakshmisahithi·Dec 24, 2024Subarray Sum Equals KIn this article, we’ll explore an intriguing problem frequently asked in technical interviews: finding the number of subarrays whose sum…
Abhay Kumar Sharma·Dec 23, 2024Problem Statement: Given an array of integers nums and an integer k, return the total number of…So, First of all what exactly is a Subarray? A subarray simply means a contiguous & non-empty part of an array. For eg: if array = [1, 2…