Solution: Number of People Aware of a Secret
Understand how to apply dynamic programming to solve the Number of People Aware of a Secret problem. Learn to track daily sharers using a dp array, optimize calculations with modular arithmetic, and compute the final count before people forget the secret.
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 ...