Amazon interview question

Highest profit problem Maximum unit problem