Amazon Interview Question

algorithm and coding in any language of choice