Sort binary tree