Sort a given stack using another stack