Cours lycee pilote informatique les algorithmes de tri et de recherche 3eme informatique 2011 2012 mme amira bouganmi pdf 1
Mr Bassem Guetif L S Mhamdia LES algorithmes de tri Et de recherche Objectifs ? Manipulation des algorithmes de tri et de recherche à savoir Tri par sélection à bulles et par insertion Recherche séquentielle et dichotomique A Le tri d ? un tableau I Introduction Le tri est une opération qui consiste à répartir ou organiser une collection d ? objets selon un ordre déterminé Dans le domaine de l ? informatique il existe plusieurs méthodes de tri algorithmes Dans ce chapitre nous allons découvrir trois méthodes de tri ? Tri par sélection ? Tri à bulles ? Tri par insertion II Tri par sélection Activité Ecrire un programme qui permet de saisir un tableau T de n entiers puis trier en ordre croissant ce tableau en utilisant la méthode de tri par sélection et a ?cher le résultat a Principe Cette méthode de tri consiste à Se pointer à la ère case du tableau T et de parcourir la totalité du tableau pour repérer l ? indice de la première position du minimum Comparer ce minimum avec T S ? ils sont di ?érents on les permute Le sous tableau de T allant de à n est à priori non trié on applique l ? étape et et ainsi de suite jusqu ? à l ? avant dernier élément n- b Exemple Soit un tableau T contenant les dix éléments suivants T - - - Etape Parcourir la totalité du tableau pour repérer le minimum indice de la première position du minimum et le comparer avec T T - - - On obtient Indice du minimum T T alors permutation T - - - Le sous tableau allant de à n est à priori non trié on applique l ? étape et et ainsi de suite jusqu ? à l ? avant dernier élément n- - - CMr Bassem Guetif L S Mhamdia Etape T - - - Indice du minimum T T alors permutation On obtient T - - - Etape T - - - Indice du minimum On obtient T T alors permutation T - - - Etape T - - - On obtient T - Etape T - T T alors permutation - - - - Indice du minimum Indice du minimum T T alors permutation - - CMr Bassem Guetif L S Mhamdia On obtient T - - - Etape T - - - On obtient Indice du minimum T T alors permutation T - - - Etape T - - - On obtient T Etape T Indice du minimum T T alors pas de permutation - - - - - - On obtient T Etape T T T alors pas de permutation - - - - - - Indice du minimum On obtient T T alors permutation Indice du minimum - - CMr Bassem Guetif L S Mhamdia T - - - Remarque ? On est arrivé à l ? élément numéro n- alors arrêt du traitement ? Nous n ? avons pas
Documents similaires
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/G7daINsg98kdb6ItVIWx7QmcpR6mAnYgUaZmmdgG4SV5khZvHucJe4moz8dPPnn8IlO0C4M4bPZ3noa8kQwDgoBk.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11701018697welaztwtgnamwt70uknwmxxmqngufsqjrxu4mr4ybvurwkzzrhj8ht9cnzurf6690atrlagyeszpqcyzmvmsvl2eetk5n8l9of7x.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11701114150ztp0oybhd3zvbqvbj0p8oerbprl0z6t2ehj4bcwdduoeyjtkddpndex7j0ert7buj53wrvcqrgd3ujoqka1rlfjesprjud9wg2tl.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11701119185fjfrufcxmyu2jeyxoymnbx3yahvtxzllilgavhpbi1wvehokz12fjgltwphxkvfvp5rq0qlkyhqmqzy8wqcsrgei4fequmkyhoh0.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/117011203362pxuoprdyqxdr8qwe8wgsreyya5enuobjt3tyhxnvzc1vz1ujiqtymisfgkegmgs18gl0hyfhyx3eyabdtvvr43qlkecl3x4zc2o.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/lEGtQcCM93S5ZE7ifLhjxHKclA8Hq2ApIH6lBaH6c5o0qq6v7XvrtwZvR5VCwcUmSWvcCWcNnOdQl1uhDFfdoOF6.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11701109825g0weuptxlm2mo5xgqljs5gvngpk33o9d3caib3xiol1s7df3mk7bszpjnl88hgorobsmssrtz1xyvrxzd2tm7wiudlgnossfddwx.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11701027738rnsulf9w8iqppboiwmrllczxcacqodtnjhttjrw0kqlsdwygwvtksj85kfiwdzi6mxearhb4dxd4msgk96iiiew5ixgmqrqwmhol.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11701016438vyebbmatz8agxsfjcmb2nueexkio2zq6cgfxavbeuilamsjiuy9u0lga9uuyoyluc3mdu3cx9yr1upnomckdyfawoekkpxdpi8rm.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/11701079867khv2amvt8ip0oa5ow4qefcce2w5r8ci6pu1miw9ij6njs52cipn6ax09jawpf5dufsztfellzusw7oekmw0eosl9uel3cobibf1i.png)
-
33
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Jan 15, 2021
- Catégorie Administration
- Langue French
- Taille du fichier 74.9kB