Skip to content

Latest commit

 

History

History
15 lines (14 loc) · 586 Bytes

File metadata and controls

15 lines (14 loc) · 586 Bytes

Sliding Window

  1. Sub Array Sum Problem.
    Question
    Solution
    Command:-

    $ go run 1.sub-array-sum-solution.go
    Method TimeComplexity SpaceComplexity Source
    Brute Force O(N^3) O(1)
    Prefix SumArray O(N^2) O(N)
    Prefix SumArray + Binary Search O(Nlog(N)) O(N)
    Sliding Window O(N) O(1) Link