Algorithms, Data Structures, DFS, Bfs, Graphs.
105 1 <= B[i][0], B[i][1] <= A Providing here next pictures just to give an understanding of the difference between directed and undirected graphs. Since we have it mentioned in the task. Also worth saying there is weighted and unweighted graphs exist. But again — today we’re dealing with the