Amazon Interview Question

standard coding challenges involving algorithm