Algorithm · Amazon · Medium
Top K Slowest Requests in a Log Medium · Heap, Sorting · Company Tags · Hints You are analyzing a set of server logs. Each log entry contains a request identifier (a string without spaces), followed by two integer timestamps: the start time and the end time (where start <= end). The time taken by that request is end - start. Your task is to find the k requests with the longest processing times. If multiple requests have the same duration, break ties by selecting the ones…
Checking your access…