Arista Networks Interview Question

tree traversal