Search⌘ K
AI Features

Solution: Number of People Aware of a Secret

Explore how to apply dynamic programming techniques to solve the problem of tracking the number of people aware of a secret across days. Learn to use an efficient dp array and running counters to manage sharing delays and forgetting times, preparing you for similar coding interview questions.

Statement

On day 11, exactly one person discovers a secret.

Each person who learns the secret will begin sharing it with one new person every day, but only after a waiting period of delay days from when they first discovered it. Additionally, each person completely ...