其他分享
首页 > 其他分享> > 【leetcode_easy】1475. Final Prices With a Special Discount in a Shop

【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;

标签:Shop,Final,Discount,1475,Prices,leetcode
来源: https://www.cnblogs.com/happyamyhope/p/13321278.html