Commit aacd0926 authored by Vincent-Xavier JUMEL's avatar Vincent-Xavier JUMEL 📚
Browse files

Suppression des doublons dans la dernière sortie


Signed-off-by: Vincent-Xavier JUMEL's avatarVincent-Xavier JUMEL <endymion@thetys-retz.net>
parent 3806bedd
Pipeline #179029 failed with stage
in 2 minutes and 27 seconds
......@@ -185,7 +185,14 @@ def cycles_longueur_3(liste_chemins):
for chemin in liste:
if chemin[0]==chemin[3]:
liste_cycles.append(chemin)
return liste_cycles
s = [set(l) for l in liste_cycles]
ens_cycles = []
for elem in s:
if elem not in ens_cycles:
ens_cycles.append(elem)
return ens_cycles
def sommets_cycles_3(matrice):
"""
Retourne la liste des sommets appartenant a un cycle de mongueur 3
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment