Amazon interview question

Write an algorithm that helps with inventory adjustment and cost prediction