Salesforce interview question

Convert a binary tree into a linked list