adjaatiomatriisi
Adjaatiomatriisi, also known as an adjacency matrix, is a square matrix used in graph theory to represent a finite graph. The elements of the matrix indicate whether pairs of vertices in the graph are adjacent or not.
In a simple graph, the adjacency matrix is a symmetric matrix where the entries are usually 0
The adjacency matrix can also be used to represent weighted graphs. In this variation, A[i][j] stores the
Adjacency matrices are a fundamental tool for various graph algorithms, including finding shortest paths, checking connectivity,