Find the Damaged Toy

Asked at Goldman Sachs · Coding & Leetcode-style Questions · Difficulty: Easy

At a birthday party, N kids (IDs from 1 to N) sit in a circle. The host has T toys to distribute, starting from kid with ID D and giving one toy at a time in ascending order. After reaching kid N, the count continues from kid 1.

Loading the problem…