Verified interview challenge
Match partial crash reports to stack traces
Identify known stack traces from the final frames visible in a partial crash report.
Unlock with Full AccessThe challenge
A crash report contains only the final visible frames of a stack. Match it against a collection of complete known traces and return every trace whose ending fits the report.
Many traces can share the same final frames, and the workload contains a large number of traces and queries. Choose an index that preserves those multiple matches while avoiding a fresh scan of the whole collection for each report.
What you'll practise
Trace indexing
Organise the known frames for repeated suffix queries.
Exact matches
Preserve frame order, multiple results and the required console formatting.
import sys
def main():
# Read input and print your result
passRun your code to see results.