Slowest request path

Write codeEasy10 min

Your task

A latency log records one completed request per line as "<path> <latency_ms>", for example "/checkout 340", with latency as a non-negative integer. Given at least one line, return the path of the slowest request. If several requests share the maximum latency, return the path of the one that was logged earliest. The same path may appear on many lines; each line counts as its own request.

Examples

slowest_request(lines: list[str]) -> str
Example 1
Inputslowest_request(["/home 120", "/checkout 340", "/api/items 340"])
Output"/checkout"