Walmart Interview Question

Nothing difficult. Just basic algorithms.