You should your st array directly, not with an extra sortarr.