Company: Kickdrum_17sep
Difficulty: medium
People Aware of Feature Problem Description A new in-app feature launches on day 1 and one early adopter learns about it. A user who learns the feature on day d starts telling others from day ( d + delay ) and forgets (stops knowing and stops sharing) from day ( d + forgetAfter ). Every day, every user who is currently in their 'sharing window' tells exactly one new user (who learns that day). Given the number of days n , return how many users still know the feature on day n . Since the number can be large, return it modulo 1,000,000,007. Input Format Integer n - total days to simulate Integer delay - days after learning when a user starts sharing Integer forgetAfter - days after learning when a user forgets Output Format Single integer: users who still know the feature on day n (mod 1e9+7) Constraints 1 <= n <= 1000 1 <= shareDelay < forgetAfter <= n Examples Example 1: Input: n=6, delay=2, forgetAfter=4 Output: 5 Explanation: Day 1: Suppose the first person is named A.