expand 0 cases in sorting arrays