Pregunta de entrevista de Nykaa

Array/Stack based question on frequency on numbers