move sorter to panda.algorithm.sort, add TreeNode