Walmart interview question

algorithms.