You own an online shop. You have
n
items that you are selling, and for each item i
(starting from zero), you are selling
that item for prices[i]
dollars.
This is a companion discussion topic for the original entry at https://algo.monster/problems/twitter_oa_final_discounted_price/