Capital One interview question

Two sum, sliding window problem