Pregunta de entrevista de Anonymous Content

coding question based on array and stack