Amazon interview question

three some problem from Leet code with optimization, LP of amazon