Adjacency Matrix
The adjacency matrix basically contains a matrix, in which each row and column is a vertice in the graph and every single cell in the matrix corresponds to a possible edge. This method uses $O(n^2)$ space.
Search
The adjacency matrix basically contains a matrix, in which each row and column is a vertice in the graph and every single cell in the matrix corresponds to a possible edge. This method uses $O(n^2)$ space.