Workday interview question

Implement class for a cache