Amazon Interview Question

was asked to take a test