The Monotonic Stack be very difficult to understand, and even hard to actually utilize!
I wrote up a solution over on leetcode that solves the problem 1475. Final Prices With a Special Discount in a Shop.
I am testing out using DEV to get feedback on solutions I write up (over on leetcode), so please check it out!
If this helps feel free to let me know either here or there! If you have any suggestions, or see things I can make more clear, don’t hesitate to let me know!