Design a constrained cache and secure string validator | Robinhood Interview Question