modified stacksort and 1array-2stack programs