Walmart interview question

no difficulties