You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this problem, we use the Sliding Window technique to compute the sums of cards between the positions (i,j). This gives us a linear runtime. If the sum of cards is exactly k at any point in time, we can return early.