Twitch SDE Interview Question 2025 March | Greedy Algorithms | On-campus
Question · Posted Jun 2026
Question 1: Candy Problem Statement There are n children standing in a line. Each child is assigned a mathematical rating value given in the integer array ratings. You must distribute candies to these children subjected to the following absolute requirements: Each child must have at least one candy. Children with a strictly higher rating get MORE candies than their adjacent neighbors. Return the absolute minimum number of candies you need to have to distribute the candies to the children. Constraints ...
The full answer & interview discussion are available to premium members.
Log in Create a free account