天天看點

【leetcode_easy】1475. Final Prices With a Special Discount in a Shop

leetcode_easy_array

problem

​​1475. Final Prices With a Special Discount in a Shop​​

solution #1: 使用新數組更新資料;

code

solution #2: 直接在原數組更新資料;

code:

注意:

1. 滿足更新資料的邊界條件是大于等于;

2. 更新後的結果是打折後的資料;