Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Julien David
lipn-search
Commits
92700a29
Commit
92700a29
authored
Mar 09, 2021
by
Pranavan RAJENDIRAN
Browse files
hamming.py modifier
parent
f1745bd5
Changes
1
Hide whitespace changes
Inline
Side-by-side
index_inverse/src/hamming.py
View file @
92700a29
...
...
@@ -4,7 +4,7 @@
# @param v : un mot de longueur n
# @contrainte Longueur de u et v dois être égale
# @return -1 si longueur de u et v ne sont pas égale
# tmp la distance de hamming entre u et v
def
hamming
(
u
,
v
):
tmp
=
0
...
...
@@ -14,6 +14,3 @@ def hamming(u,v):
if
(
u
[
i
]
!=
v
[
i
]):
tmp
=
tmp
+
1
return
tmp
res
=
hamming
(
"mais"
,
"mats"
)
print
(
res
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment