Implement an In-Memory Database | Two Sigma Coding Question