Distribute N chocolates among K friends. In each turn i (starting at i=1), give i chocolates to the current friend. If i > remaining chocolates, give all remaining. Continue until no chocolates are…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.