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

utils.py

Blame
  • listes-liee-boucle.py 283 B
    from liste_liee import *
    
    ll = liste_liee() # 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 ! ")