Pregunta de entrevista de Signet Jewelers

leetcode medium questions. It was a 2D array question and one graph question