Pregunta de entrevista de Qualcomm

medium/hard lc question: memory matrix