結果 : maximum and minimum element in array leetcode