Implement a versioned in-memory DB with CAS and history | Meta Interview Question