Implement an in-memory database with TTL and backup | xAI Interview Question