Calculate valid daily usage with gap constraints | TikTok Interview Question