Easy · Trees · about 10 minutes
Asked at Meta, Google, Apple, Amazon, Microsoft.
List every route from the root down to a leaf, writing each route as its values joined by -> (for example "1->2->5"). Any order is fine.
->
"1->2->5"