Walmart interview question

puzzles and algorithms