Solve the subarray target sum problem in O(n) time and space using HashMap.