partition sort, partition sort for alpha type, alpha arbitrary tree, leaf sorting function