Given a log file with timestamps and IPs, rate-limit IPs making more than x requests in a 10-minute window.
You are given a list of log entries, where each entry is (timestamp, ip). Timestamps are integers in seconds and the list is not guaranteed to be sorted. Return the IPs that should be rate-limited, in ascending order, after processing all entries.
def rate_limit_ips(logs, x):
logs: list of [timestamp, ip] pairsx: integer thresholdx requests in any 600-second window.def rate_limit_ips(logs, x):