Leetcode 1475: Final Prices With a Special Discount in a Shop
2 min readJun 14, 2020
In this Leetcode problem, we want to find the real prices of items given a special discount rule.
Solution
A couple of ideas for the solution:
- Create a new array
res
to hold the result of the method (we could very well use the input array too, and there is no problem doing that)