Algorithm · Google · Medium
Streaming Log Processor Medium · Topics · Company Tags · Hints Design a log stream processor that receives logs one at a time and supports two operations. add_log(timestamp, message) – inserts a new log entry. For a given message, only the log with the largest timestamp is considered active; any previous entry for the same message becomes inactive. get_next() – returns the active entry that has the smallest timestamp and has not been returned before. The return value is a…
Checking your access…