Amazon Interview Question

Two programming problems to resolve within two hours.