Pregunta de entrevista de Globys

Given a 2x2 matrix representing a graph, write a function to check if the graph is connected.