Add minMax and create tree. Need to correct problem to calc gow much
reversing there is.