Started sorting method for MaximalElementInArrayPortion