Pregunta de entrevista de Google

There was a question regarding a python based matrix