Pregunta de entrevista de Lakshmi

Based on Java and c