【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. 更新后的结果是打折后的数据;

 

参考

1. leetcode_1475. Final Prices With a Special Discount in a Shop;

posted on 2020-10-29 22:50  鹅要长大  阅读(62)  评论(0编辑  收藏  举报

导航