This is a medium level problem and can be solved if you've already tried some more problems related to array. The intuition is not a very easy one but can be made if you think closely.
Link to the problem: https://leetcode.com/problems/subarra...
Watch video Subarray Sum Equals K | Leetcode | Medium | Java | O(n) | HashMap online, duration hours minute second in high quality that is uploaded to the channel AlgorithmHQ 01 August 2023. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 1,302 times and liked it 30 visitors.