Pregunta de entrevista de Teranet

Regarding coding logics. Also some test cases