swipes, where swipes[i] = [name, time]: name is the employee's name and time is the moment of the swipe in four-digit 24-hour format, such as "0745" or "2310".
An employee is *frequent* if they have at least three swipes that fit into one hour, meaning the gap between the earliest and the latest of them is strictly less than 60 minutes. Swipes at "0815" and "0915" are already too far apart. All records belong to a single day, so "2355" and "0005" do not fall into the same hour either.
Return the names of all frequent employees in any order.swipes=[["anna", "0910"], ["boris", "0915"], ["anna", "0955"], ["boris", "1020"], ["anna", "0930"], ["boris", "1100"]] → ['anna']
anna swiped at 09:10, 09:30 and 09:55, all within one hour. boris swiped at 09:15, 10:20 and 11:00, and no three of them fit in an hour.
swipes=[["kim", "1400"], ["kim", "1430"], ["kim", "1500"]] → []
14:00 and 15:00 are exactly one hour apart, which no longer counts as the same window, so kim is not in the answer.
swipes=[["lee", "2350"], ["lee", "2359"], ["lee", "0005"], ["max", "0800"]] → []
All swipes belong to the same day: 00:05 is the start of the day, not a continuation of 23:59, so lee has no busy window.
time is four digits forming a valid time from "0000" to "2359"swipes=[["anna", "0910"], ["boris", "0915"], ["anna", "0955"], ["boris", "1020"], ["anna", "0930"], ["boris", "1100"]]
['anna']
Run checks the first 3 tests in your browser. Submit checks all 117 tests on the server, hidden ones included.