Correct grammar of comment in backtracking/hamiltonian_cycle.py (#4868)

This commit is contained in:
DukicDev 2021-10-02 15:51:53 +02:00 committed by GitHub
parent 31b34af9fa
commit c873fa0b1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,8 +15,8 @@ def valid_connection(
Checks whether it is possible to add next into path by validating 2 statements Checks whether it is possible to add next into path by validating 2 statements
1. There should be path between current and next vertex 1. There should be path between current and next vertex
2. Next vertex should not be in path 2. Next vertex should not be in path
If both validations succeeds we return True saying that it is possible to connect If both validations succeed we return True, saying that it is possible to connect
this vertices either we return False this vertices, otherwise we return False
Case 1:Use exact graph as in main function, with initialized values Case 1:Use exact graph as in main function, with initialized values
>>> graph = [[0, 1, 0, 1, 0], >>> graph = [[0, 1, 0, 1, 0],