chore: fix typos in src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java (#7026)

Fix typos in src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java

Co-authored-by: a <19151554+alxkm@users.noreply.github.com>
This commit is contained in:
Lê Nam Khánh
2025-11-05 17:48:33 +07:00
committed by GitHub
parent dd01b35d97
commit fab09e7da1

View File

@@ -141,7 +141,7 @@ class AdjacencyMatrixGraph {
*
* @param from the parent vertex to check for adjacency
* @param to the child vertex to check for adjacency
* @return whether or not the vertices are adjancent
* @return whether or not the vertices are adjacent
*/
private boolean adjacencyOfEdgeDoesExist(int from, int to) {
return (this.adjacency()[from][to] != AdjacencyMatrixGraph.EDGE_NONE);
@@ -162,7 +162,7 @@ class AdjacencyMatrixGraph {
*
* @param from the parent vertex to check for adjacency
* @param to the child vertex to check for adjacency
* @return whether or not the vertices are adjancent
* @return whether or not the vertices are adjacent
*/
public boolean edgeDoesExist(int from, int to) {
if (this.vertexDoesExist(from) && this.vertexDoesExist(to)) {