Butternut Box interview question

Solve month 1 to 3 retention problem