Skip to content
Snippets Groups Projects
Select Git revision
  • d9a28d3e5389c288774a746ac009b1036baea301
  • main default protected
  • Localisation
3 results

MCL.py

Blame
  • listes-liees-boucle.py 283 B
    from LinkedList import *
    
    ll = LinkedList() # Ajout de données
    ll.push(20) 
    ll.push(4) 
    ll.push(15) 
    ll.push(10)
       
    # Création d'une boucle
    ll.head.next.next.next.next = ll.head; 
      
    if( ll.detectLoop()): 
        print ("Il y a une boucle !") 
    else : 
        print ("Pas de boucle ! ")