Company: Kickdrum_13oct
Difficulty: medium
People Aware of Feature Problem Description A brand-new in-app feature ships on day 1, and exactly one early adopter finds out about it that day. Anyone who learns about the feature on day d begins telling other users starting day (d + delay) , and stops knowing (and therefore stops telling anyone) starting day (d + forgetAfter) . On any given day, every user currently inside their own sharing window tells exactly one brand-new user, who then learns it that same day. Given the number of days n , work out how many users still know about the feature on day n . The count may be large, so 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) Examples Example 1: Input: n=6, delay=2, forgetAfter=4 Output: 5 Explanation: Day 1: Call the very first user A. (1