Amazon Interview Question

dsa question of sub array sum and other was a leetcode hard problem