Pergunta de entrevista da empresa Nykaa

Array/Stack based question on frequency on numbers