← 返回 oracle 的题目列表Find Users with Valid Session
类型:online_judge
You are given a list of log entries, where each log is in the format 'userId action timestamp'. You're also given a variable max time. A session is considered valid if the time difference between a 'signin' and the subsequent 'signout' is less than or equal to max time. Find and return all user IDs that have at least one valid session.
Example
Input
['1 signin 100', '1 signout 150', '2 signin 200', '2 signout 210']
50