Walmart Interview Question

Q: Walking through the code and introduce the method