Walmart interview question

Will be asked to write code on the fly - provide multiple ways to solve problem