Competitive-Programming-and-Contests-VP-Solution

The repository that contains all solutions made for the course Competitive Programming and Contests by the University of Pisa

View the Project on GitHub

Longest k-Good Segment

Solved Solution Time :clock11:
:heavy_check_mark: Queue 312 ms
:heavy_check_mark: Two pointers 327 ms

Solution or Solution discussion

The time complexity of the solution in both cases is O(N) and also the space complexity is O(N).