Amazon Interview Question

Can you write a code for xyz?