Info Edge interview question

Find first subarry whose sum equals k.

Interview Answer

Anonymous

17 Aug 2022

First told the brute force O(n^2) approach, then optimised to O(n) using sliding window approach