Easy
Design a logger that limits each unique message to being printed at most once every 10 seconds. Implement Logger() and shouldPrintMessage(timestamp, message), which returns true if the message should be printed at the given timestamp (in seconds), and false otherwise. A message printed at time t may next be printed at t + 10 or later.
Input: operations = ["Logger","shouldPrintMessage","shouldPrintMessage","shouldPrintMessage","shouldPrintMessage","shouldPrintMessage","shouldPrintMessage"], values = [[],[1,"foo"],[2,"bar"],[3,"foo"],[8,"bar"],[10,"foo"],[11,"foo"]] Output: [null,true,true,false,false,false,true]