mirror of
https://github.com/Fare-spec/cours.git
synced 2025-12-09 11:30:38 +00:00
tried to add dijkstra implementation
This commit is contained in:
17
tp6_enirely/TP6/Pile_LSC.py
Normal file
17
tp6_enirely/TP6/Pile_LSC.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import LSC as lsc
|
||||
from typing import Any
|
||||
|
||||
def creer_pile_vide() -> lsc.Liste_Simplement_Chainee:
|
||||
return lsc.creer_liste_vide()
|
||||
|
||||
def est_pile_vide(liste: lsc.Liste_Simplement_Chainee) -> bool:
|
||||
return lsc.est_vide(liste)
|
||||
|
||||
def sommet(liste: lsc.Liste_Simplement_Chainee) -> Any:
|
||||
return lsc.tete(liste)
|
||||
|
||||
def empiler(liste: lsc.Liste_Simplement_Chainee, element: Any) -> lsc.Liste_Simplement_Chainee:
|
||||
return lsc.ajouter_en_tete(liste,element)
|
||||
|
||||
def depiler(liste: lsc.Liste_Simplement_Chainee) -> lsc.Liste_Simplement_Chainee:
|
||||
return lsc.queue(liste)
|
||||
Reference in New Issue
Block a user