Skip to content
Snippets Groups Projects
Select Git revision
  • b43cb569dc63a214797da24a449570ee88c535ac
  • master default protected
2 results

listes-liee-boucle.py

Blame
  • Forked from Vuillemot Romain / INF-TC1
    Source project has a limited visibility.
    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 ! ")