Algorithms
Medium
2933
3202
High-Access Employees
high-access-employees
"""
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.

Example 1:

Input: access_times = [["a","0549"],["b","0457"],["a","0532"],["a","0621"],["b","0540"]]
Output: ["a"]
Explanation: "a" has three access times in the one-hour period of [05:32, 06:31] which are 05:32, 05:49, and 06:21.
But "b" does not have more than two access times at all.
So the answer is ["a"].
Example 2:

Input: access_times = [["d","0002"],["c","0808"],["c","0829"],["e","0215"],["d","1508"],["d","1444"],["d","1410"],["c","0809"]]
Output: ["c","d"]
Explanation: "c" has three access times in the one-hour period of [08:08, 09:07] which are 08:08, 08:09, and 08:29.
"d" has also three access times in the one-hour period of [14:10, 15:09] which are 14:10, 14:44, and 15:08.
However, "e" has just one access time, so it can not be in the answer and the final answer is ["c","d"].
Example 3:

Input: access_times = [["cd","1025"],["ab","1025"],["cd","1046"],["cd","1055"],["ab","1124"],["ab","1120"]]
Output: ["ab","cd"]
Explanation: "ab" has three access times in the one-hour period of [10:25, 11:24] which are 10:25, 11:20, and 11:24.
"cd" has also three access times in the one-hour period of [10:25, 11:24] which are 10:25, 10:46, and 10:55.
So the answer is ["ab","cd"].

Constraints:

1 <= access_times.length <= 100
access_times[i].length == 2
1 <= access_times[i][0].length <= 10
access_times[i][0] consists only of English small letters.
access_times[i][1].length == 4
access_times[i][1] is in 24-hour time format.
access_times[i][1] consists only of '0' to '9'.
"""
class Solution:
    def findHighAccessEmployees(self, access_times: List[List[str]]) -> List[str]:
        
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.

Example 1:

Input: access_times = [["a","0549"],["b","0457"],["a","0532"],["a","0621"],["b","0540"]]
Output: ["a"]
Explanation: "a" has three access times in the one-hour period of [05:32, 06:31] which are 05:32, 05:49, and 06:21.
But "b" does not have more than two access times at all.
So the answer is ["a"].
Example 2:

Input: access_times = [["d","0002"],["c","0808"],["c","0829"],["e","0215"],["d","1508"],["d","1444"],["d","1410"],["c","0809"]]
Output: ["c","d"]
Explanation: "c" has three access times in the one-hour period of [08:08, 09:07] which are 08:08, 08:09, and 08:29.
"d" has also three access times in the one-hour period of [14:10, 15:09] which are 14:10, 14:44, and 15:08.
However, "e" has just one access time, so it can not be in the answer and the final answer is ["c","d"].
Example 3:

Input: access_times = [["cd","1025"],["ab","1025"],["cd","1046"],["cd","1055"],["ab","1124"],["ab","1120"]]
Output: ["ab","cd"]
Explanation: "ab" has three access times in the one-hour period of [10:25, 11:24] which are 10:25, 11:20, and 11:24.
"cd" has also three access times in the one-hour period of [10:25, 11:24] which are 10:25, 10:46, and 10:55.
So the answer is ["ab","cd"].

Constraints:

1 <= access_times.length <= 100
access_times[i].length == 2
1 <= access_times[i][0].length <= 10
access_times[i][0] consists only of English small letters.
access_times[i][1].length == 4
access_times[i][1] is in 24-hour time format.
access_times[i][1] consists only of '0' to '9'.


Please complete the code below to solve above prblem:
```python
class Solution:
    def findHighAccessEmployees(self, access_times: List[List[str]]) -> List[str]:
        
```

my_solution = Solution()

test_input = { "access_times": [["a","0549"],["b","0457"],["a","0532"],["a","0621"],["b","0540"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["a"]

test_input = { "access_times": [["d","0002"],["c","0808"],["c","0829"],["e","0215"],["d","1508"],["d","1444"],["d","1410"],["c","0809"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["c","d"]

test_input = { "access_times": [["cd","1025"],["ab","1025"],["cd","1046"],["cd","1055"],["ab","1124"],["ab","1120"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["ab","cd"]

test_input = { "access_times": [["baipstt","1456"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["bouo","1126"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["cavfbqg","2304"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["cenjcq","1007"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["cqotrwqcaq","0131"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["downbuk","1951"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["dqsoiyz","2204"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["duzeyrov","0243"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["erfg","1223"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["fwhefd","2026"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["gbefbne","0911"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["gp","1540"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["ht","1319"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["inahnsjdqz","1750"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["jwxvijxo","0851"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["kibwwvjuez","0716"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["lvry","0706"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["mbsyxxfzjf","0114"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["mlehvzqb","1620"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["mmgat","0516"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["mxatapbs","2240"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["mzxbgtfc","1531"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["nnhh","1445"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["o","1414"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["qaxqifxxww","1557"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["rjy","0200"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["sgpgh","0539"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["sxx","0325"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["tkvgcf","1645"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["ttk","0304"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["un","0833"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["vlifcdn","0731"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["w","2224"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["wkmehwsg","2023"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["y","1005"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["ynnale","1331"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["yt","0900"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["zbgzk","0527"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["a","0039"],["a","0042"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["ajhzcltqse","0605"],["ajhzcltqse","0558"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["cbaqsymoi","0001"],["cbaqsymoi","0004"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["df","1958"],["df","2002"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["dhmnhvou","0529"],["dhmnhvou","0531"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["epghzrog","0333"],["epghzrog","0333"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["gda","1529"],["gda","1534"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["gjhtgm","2207"],["gjhtgm","2156"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["gsd","2030"],["gsd","2046"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["gsstuktwm","1403"],["gsstuktwm","1357"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["h","2159"],["h","2203"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["hxrdffk","1736"],["hxrdffk","1724"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["iaxsnenx","2037"],["iaxsnenx","2050"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["ikwjvflxq","0055"],["ikwjvflxq","0056"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["jkgjmku","0743"],["jkgjmku","0754"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["jkw","0241"],["jkw","0235"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["jykugiprxf","1633"],["jykugiprxf","1641"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["kdxw","1338"],["kdxw","1336"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["kenltmrg","0932"],["kenltmrg","0941"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["kptjrr","1356"],["kptjrr","1349"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["mcd","1333"],["mcd","1325"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["mhkizga","1552"],["mhkizga","1551"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["monxm","1748"],["monxm","1742"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["msjydtinfy","1301"],["msjydtinfy","1245"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["myhdmu","1407"],["myhdmu","1419"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["nyoezc","1050"],["nyoezc","1041"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["oksvrskxch","0053"],["oksvrskxch","0111"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["pxc","1915"],["pxc","1910"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["qedxyj","0609"],["qedxyj","0614"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["qmslkyxnph","0946"],["qmslkyxnph","0958"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["r","0206"],["r","0202"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["r","2041"],["r","2052"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["rf","2205"],["rf","2203"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["rswegeuhqd","0235"],["rswegeuhqd","0238"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["skfgl","0718"],["skfgl","0712"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["smnnl","2329"],["smnnl","2340"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["tpbbxpx","0409"],["tpbbxpx","0408"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["uiqxqp","0515"],["uiqxqp","0516"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["uyuz","1530"],["uyuz","1543"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["vfeunkee","1500"],["vfeunkee","1508"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["wbyd","1848"],["wbyd","1839"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["x","0522"],["x","0506"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["xhrhdy","1455"],["xhrhdy","1454"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["xmsypay","1605"],["xmsypay","1612"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["xy","0015"],["xy","0021"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["ydtnnpzw","0516"],["ydtnnpzw","0520"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["zh","2348"],["zh","2334"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["zinywjn","0017"],["zinywjn","0019"]] }
assert my_solution.findHighAccessEmployees(**test_input) == []

test_input = { "access_times": [["aczdfmsd","0317"],["aczdfmsd","0314"],["aczdfmsd","0320"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["aczdfmsd"]

test_input = { "access_times": [["bsluadumi","1518"],["bsluadumi","1516"],["bsluadumi","1510"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["bsluadumi"]

test_input = { "access_times": [["ckrdpxq","1122"],["ckrdpxq","1125"],["ckrdpxq","1121"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["ckrdpxq"]

test_input = { "access_times": [["fe","1320"],["fe","1326"],["fe","1331"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["fe"]

test_input = { "access_times": [["ff","1508"],["ff","1508"],["ff","1516"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["ff"]

test_input = { "access_times": [["fnlmbcedu","0052"],["fnlmbcedu","0103"],["fnlmbcedu","0055"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["fnlmbcedu"]

test_input = { "access_times": [["hffgwjjve","0159"],["hffgwjjve","0152"],["hffgwjjve","0159"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["hffgwjjve"]

test_input = { "access_times": [["ivlvfgwsx","0122"],["ivlvfgwsx","0135"],["ivlvfgwsx","0139"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["ivlvfgwsx"]

test_input = { "access_times": [["jlfnksqlt","0304"],["jlfnksqlt","0252"],["jlfnksqlt","0304"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["jlfnksqlt"]

test_input = { "access_times": [["jy","0647"],["jy","0652"],["jy","0704"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["jy"]

test_input = { "access_times": [["kchzzdso","2329"],["kchzzdso","2326"],["kchzzdso","2329"]] }
assert my_solution.findHighAccessEmployees(**test_input) == ["kchzzdso"]