This commit is contained in:
krahets
2025-05-17 17:59:42 +08:00
parent f31d65d339
commit 718e8d4a1c
10 changed files with 57 additions and 73 deletions

View File

@@ -1759,7 +1759,8 @@ comments: true
if (
!this.adjList.has(vet1) ||
!this.adjList.has(vet2) ||
vet1 === vet2
vet1 === vet2 ||
this.adjList.get(vet1).indexOf(vet2) === -1
) {
throw new Error('Illegal Argument Exception');
}
@@ -1848,7 +1849,8 @@ comments: true
if (
!this.adjList.has(vet1) ||
!this.adjList.has(vet2) ||
vet1 === vet2
vet1 === vet2 ||
this.adjList.get(vet1).indexOf(vet2) === -1
) {
throw new Error('Illegal Argument Exception');
}