AlgoMaster Logo

Final Prices With a Special Discount in a Shop

prices=[8, 4, 6, 2, 3]
0 / 18
prices8462301234stack(empty)resultmonotonic stack: an item is discounted by the next price it
algomaster.io
Step:Start of algorithm