Office Depot Interview Question

Gave different scenarios