Skip to content

Latest commit

 

History

History

02-deck-of-cards

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Deck of Cards

  • sliding window

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.