Programmez par plaisir! 19-06-2013
05:07
Prog-Info > C++ > Sommaire.

Sommaire

Introduction Introduction
Exercices c++ Exercices en C++
Tri et Recherche Tri et Recherche
Documentations Documentations
Livres Livres
Liens Liens
int partition(int tableau[], const int debut, 
              const int fin)
{
   int compteur = debut;
   int pivot = tableau[debut];
   int i;

   for(i=debut+1; i<=fin; i++)
   {
      if(tableau[i]<pivot)
      {
         compteur++;
         echanger(tableau, compteur, i);
      }
      echanger(tableau, compteur, debut);
   }
   return compteur;
}




[Plan Plan] [A propos A Propos] [ 1223186 ]
Copyright ©2002-2009 Prog-info Tous droits réservés.