Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
int teilen (int liste[], int links, int rechts)
{
int tauschwert;
int trenner = liste[rechts];
int i = links - 1;
for (int j = links; j <= rechts - 1; j++)
{
if (liste[j] < trenner)
{
i++;
tauschwert = liste[i];
liste[i] = liste[j];
liste[j] = tauschwert;
}
}
tauschwert = liste[i + 1];
liste[i + 1] = liste[rechts];
liste[rechts] = tauschwert;
return (i + 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment