Updated SortByExceedingCost