Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ex6(tab):
- if not tab:# si tab existe pas
- return tab
- maxi = tab[0]
- for j in range(1, len(tab)):
- if tab[j] > maxi:
- maxi = j
- tab[len(tab)-1], tab[maxi] = tab[maxi], tab[len(tab)-1]
- return tab
- def ex7(tab, gauche, droite, k):
- if gauche < droite:
- tab, c = Placer(tab, gauche, droite)
- if k == c:
- return tab[k]
- tab = ex7(tab, gauche, c-1, k)
- tab = ex7(tab, c+1, droite, k)
- return tab
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement