Proxify Interview Question

Sort a binary tree in javascript