Implement an expiring counter class | Uber Interview Question