Adding stack sort.