CS fundamentals and algorithmsPayPal
Sliding window preconditions
You solved "longest contiguous run of transaction amounts whose sum stays at or under a limit L" in O(n) with a two-pointer sliding window. The interviewer asks, "What if refunds show up as negative amounts?" What's the problem?
Pick one