mirror of
https://github.com/Fare-spec/cours.git
synced 2025-12-08 03:00:37 +00:00
Add 'divise2' function that divide liste in two parts
This commit is contained in:
@@ -17,6 +17,12 @@ def taille(liste):
|
|||||||
a+=1
|
a+=1
|
||||||
return a
|
return a
|
||||||
|
|
||||||
|
def divise2(liste):
|
||||||
|
n = taille(liste)
|
||||||
|
droite, gauche = partition(liste,0,n//2)
|
||||||
|
return droite,gauche
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def renverser(liste):
|
def renverser(liste):
|
||||||
result = fifo.creer_liste()
|
result = fifo.creer_liste()
|
||||||
|
|||||||
Reference in New Issue
Block a user