Gap Inc. Interview Question

Write a function to do XYZ