Distribute `candies` to `num_people` by giving 1 candy to the 1st person, 2 to the 2nd, up to K candies to the K-th person. Then give K+1 candies to the 1st person, K+2 to the 2nd, and so on. If…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.