Cisco interview question

convert tree into linked list