Company: Agoda_25july
Difficulty: medium
Token Management System Problem Description Implement a session-based authentication system that manages user sessions with unique tokens and configurable time-to-live (TTL) values. Each token has an expiration time calculated by adding its TTL (in seconds) to the creation time. Tokens can be renewed before expiration to extend their validity. The system must support three operations: generate <token_id> <current_time> : At the current time, creates a new token with the specified ID. renew <token_id> <current_time> : At the current time, extends an existing, unexpired token's expiration time. The request is ignored if the token has expired or does not exist. count <current_time> : Returns the number of unexpired tokens at the same timestamp. Important Note: Token expiration is evaluated before processing any actions at the same timestamp. If a token's expiration time exactly matches the current time, the token is considered expired and cannot be renewed or