Implement a rate limiter that allows at most k requests per minute.
Asked in the Tech phone screen stage. Given request timestamps in nondecreasing order, determine whether each request is accepted. A request at time t may be accepted when fewer than k previously accepted requests occurred in the half-open interval [t - 60, t). Requests exactly 60 seconds old no longer count.
Implement def rate_limiter(request_times, k). request_times is a list of integer timestamps in seconds, and k is a positive integer. Return a list of booleans with one value per request.
def rate_limiter(request_times, k):