LeetCode
How Many Apples Can You Put into the Basket
Click
here
for an explanation.