← Questions

Rebuild a task tree from parent-child records and print it

0
StripeCodingLast asked Sep 2026

You get a list of task records, each naming a task and its parent. Rebuild the hierarchy of tasks and subtasks and print it as a text tree with connector characters, in the exact output format the specification gives. The exercise comes in parts, and the records can come as CSV with nesting of any depth. The specification is long and the format strict, so reading it carefully is part of the test.

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