← Questions
Find the first error in a log, then trace failures through dependencies
0
I was asked this
No reports yet. Sign in to say where you were asked it.
- A service's log lines are tagged Info, Warn or Error. Once the first Error appears the service is down, so every later line is an Error too, and the line just before the first Error is always a Warn. Find the first Error line with binary search.
- Follow-up: services depend on each other, and a failed service brings down the services that depend on it. Given the dependency graph and the services that failed first, find every service that ends up failing (and, if asked, when), using BFS.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
