Pergunta de entrevista da empresa Globys

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