The Status Board
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Problem
You're triaging a batch of raw Nginx access logs and want two rollups out of them: how many times each HTTP status code appears, and every distinct resource path that was hit, listed in the order the paths first show up. A path's query string is not part of its identity, so `/api/users?page=1` and `/api/users?page=2` both count as `/api/users`. Ignore any line that isn't a well-formed log entry.
Summary
A pile of raw access logs, and two numbers that matter hiding inside the quotes.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.