結果 : sum of first last element in array leetcode