Back to problems

Find Users with Valid Login Sessions

Algorithm · Oracle · Medium

You are given a log list logs from a monitoring system; each log entry records an action by a user at a specific time. Every entry is a string in the format " ". Here, userId is a unique identifying string for the user, action is either "signin" or "signout", and timestamp is a non-negative integer indicating when the action occurred. You are also given an integer maxTime. The logs array is already sorted by time in ascending order. For a given user, a session consists of a…

Checking your access…