結果 : maximum and minimum of an array using minimum number of comparisons leetcode