Given n coins of random denominations and a number k, find the highest sum of coins a player can collect by picking 0 to k coins contiguously while leaving the next one coin.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.