Cisco interview question

Tree traversal