Practice High-Access Employees
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are given a 2D 0-indexed array of strings, access_times, with size n. For each i where 0 <= i <= n - 1, access_times[i][0] represents the name of an employee, and access_times[i][1] represents the access time of that employee. All entries in access_times are within the same day. The access time is represented as four digits using a 24-hour time format, for example, "0800" or "2250". An employee is said to be high-access if he has accessed the system three or more times within a one-hour period. Times with exactly one hour of difference are not considered part of the same one-hour period. For example, "0815" and "0915" are not part of the same one-hour period. Access times at the start and end of the day are not counted within the same one-hour period. For example, "0005" and "2350" are not part of the same one-hour period. Return a list that contains the names of high-access employees with any order you want.
Source: High-Access Employees on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
access_times = [["a","0549"],["b","0457"],["a","0532"],["a","0621"],["b","0540"]]
["a"]
# Example 2
access_times = [["d","0002"],["c","0808"],["c","0829"],["e","0215"],["d","1508"],["d","1444"],["d","1410"],["c","0809"]]
["c","d"]
# Example 3
access_times = [["cd","1025"],["ab","1025"],["cd","1046"],["cd","1055"],["ab","1124"],["ab","1120"]]
["ab","cd"]
Constraints
Related LeetCode Problems
Practice more problems similar to High-Access Employees.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.