Pregunta de entrevista de LG Soft India

Leetcode medium question. Bulls and cows.