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