Ctrl K
Backend · Junior · Coding

Write a function that takes a list of access log lines, each containing, separated by spaces, the method, path, response code, and response time in milliseconds, and returns, for each path, the number of requests and the average response time. Lines that can't be parsed should be skipped.

~15 min by voice

How to approach it

They're checking basic data processing: parsing a line into fields, aggregating by key in a single pass, computing the average correctly, and not crashing on garbage input. It also matters what you do before coding: clarify the format and explain the plan out loud.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics
Similar questionsWhat's the difference between WHERE and HAVING in SQL? Junior

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~15 min