← Microsoft questions
Codingeasy

Distribute chocolates to friends in rounds

Filed under Microsoft

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.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.