HashedIn by Deloitte interview question

subquery sum, sliding window problem and 2 pointer problems