Leetcode解題技巧- 快速閱讀題目:
歐氏定理: 「英文文法跟中文相反」。
以下這一段英文,最重要的是在「最後面」(choose an element of the array and increment it by?1.)
中文意思: 你可以選擇一個(element) ,然後加1。
以程式設計者來說,最重要的部份在於and increment it by?1. 這句英文,
代表你可以每次加1。
所以,閱讀Leetcode 題目時,要跳著看,要從文章的尾端看,才有辨法在20秒內找到重點。
You are given an integer array?nums?(0-indexed). In one operation, you can choose an element of the array and increment it by?1.
#leetcode #leetcode中文
#Greedy
1827.?Minimum Operations to Make the Array Increasing