Refering to LeetCode 560. A very clever way of using Prefix Sum with Hash-map is shown. In this post, I am going to break down this LeetCode question to reveal the idea of lowering down the time complexity by adopting Hash-map (or dictionary in Python).
Reviewing question 560, an array