Amazon Interview Question

Solve Coding Challenge with programming language of your choosing