Smartprix interview question

Competitive coding