Nubank interview question

Implement a method for an in-memory database.