Solution: Number of People Aware of a Secret
Explore a dynamic programming approach to determine how many people are aware of a secret after n days. Understand how to track active sharers through delay and forget periods, and optimize the solution using modular arithmetic for large results.
We'll cover the following...
We'll cover the following...
Statement
On day
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 ...