OpenAI interview question

in memory database, with time based state mangement