Back to Browse

Subarray Sum Equals K (LeetCode 560) | Interview Essential | Prefix Sum

28.0K views
Sep 15, 2025
17:56

πŸ‘‰ πŸ‘‰ Invaluable problem navigator: https://topmate.io/nikoo28/1672249?utm_source=public_profile&utm_campaign=nikoo28 Join this channel to get access to perks: https://www.youtube.com/channel/UCT-S2ngqEBoYCM5UKuNeELg/join Actual Problem: https://leetcode.com/problems/subarray-sum-equals-k/description/ Chapters: 00:00 - Intro 00:31 - Problem Statement and Description 02:17 - Brute Force Approach 03:49 - Prefix Sum Method 08:16 - Efficient Approach 14:55 - Dry run of Code 17:08 - Final Thoughts πŸ“˜ A text based explanation is available at: https://studyalgorithms.com Code on Github: https://github.com/nikoo28/java-solutions/blob/master/src/main/java/leetcode/medium/SubArraySumEqualsK.java Test-cases on Github: https://github.com/nikoo28/java-solutions/blob/master/src/test/java/leetcode/medium/SubArraySumEqualsKTest.java πŸ“– Reference Books: Starting Learn to Code: https://amzn.to/3sJm8Wl Favorite book to understand algorithms: https://amzn.to/4848xJH Favorite book for data structures: https://amzn.to/3P96YBv Get started for interview preparation: https://amzn.to/44Nn5du πŸ”— To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalgorithms πŸ’» Get Social πŸ’» Follow on Facebook at: https://www.facebook.com/studyalgos Subscribe to RSS feeds: https://studyalgorithms.com/feed/ Join fan mail: http://eepurl.com/g9Dadv #leetcode #programming #interview

Download

1 formats

Video Formats

360pmp434.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Subarray Sum Equals K (LeetCode 560) | Interview Essential | Prefix Sum | NatokHD