Implement a Transactional Key-Value Store | Grammarly Interview Question