Marks & Spencer Interview Question

Solve a medium difficulty coding challenge