← Questions

Authentication token manager with expiry

0
MicrosoftAppleCodingLast asked Sep 2026

Build a manager for tokens that live for a fixed time: generate(id, now), renew(id, now) which only works on a token that has not expired, and count_unexpired(now). Discuss how expired tokens are cleaned up and how to make the count fast.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding