Convert a Binary Tree into a linked list and back?

Write a function to convert a binary tree into a linked list and the convert the linked list back to a binary tree