Pregunta de entrevista de IBM

Complete code problems that they give you