Skip to content

Edit_Distance algorithm for genetic string matching #10336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Prev Previous commit
Update edit_distance.py
  • Loading branch information
anshul-2010 authored Oct 12, 2023
commit 4d64c3ee1c5109c7bf7adae4ad2882ee308297d6
2 changes: 1 addition & 1 deletion genetic_algorithm/edit_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def edit_distance(source: str, target: str) -> int:
:param target: str
:return: int

>>> edit_distance("GATTIC, GALTIC)
>>> edit_distance("GATTIC", "GALTIC")
1
"""
delta = {True: 0, False: 1} # Substitution

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An error occurred while parsing the file: genetic_algorithm/edit_distance.py

Traceback (most recent call last):
  File "/opt/render/project/src/algorithms_keeper/parser/python_parser.py", line 146, in parse
    reports = lint_file(
              ^^^^^^^^^^
libcst._exceptions.ParserSyntaxError: Syntax Error @ 19:4.
parser error: error at 18:3: expected INDENT

    delta = {True: 0, False: 1}  # Substitution
   ^

Expand Down