First construct a group of candidate minimums and a group of candidate maximums.