Goldman Sachs Software Engineer OA 2026 | Find the Damaged Toy, Maximum Stock Profit & Valid Parentheses

GoldmanSachs · Question · Posted Jun 2026

Problem 1 - Find the Damaged Toy Problem Statement You are given N children sitting in a circle and numbered from 1 to N. Starting from child D, a total of T toys are distributed one by one in clockwise order. The last toy distributed is damaged. Return the index of the child who receives the damaged toy. Constraints Constraint 1 ≤ N ≤ 109 1 ≤ T ≤ 109 1 ≤ D ≤ N Test Case Input Output N ...

The full answer & interview discussion are available to premium members.

Log in Create a free account