Files
TermNSI/Sujet_bac/Pratique/BNS_2025/25-NSI-19/sujet-19.py

15 lines
305 B
Python
Raw Normal View History

def separe(tab):
'''Separe les 0 et les 1 dans le tableau tab'''
gauche = 0
droite = ...
while gauche < droite:
if tab[gauche] == 0 :
gauche = ...
else :
tab[gauche] = ...
tab[droite] = ...
droite = ...
return tab