Amazon Interview Question

What are the errors in this code