def tree_sort(self): tree = BST() if self is []: return [] for i in range(len(self)): tree.insert(self[i]) items = tree.inorder2() return items
def tree_sort_r(data): tree = BST() if len(data) == 0: return data tree.insert(data[0:]) return tree.inorder2()