Maximum Candies Allocated to K Children | Leetcode 2226