Nubank Interview Question

Implement a method for an in-memory database.