13SS_6b_PG1_Algorithmen_Datenstrukturen_Suchen_Sortieren_Stud_01_21.pdf
13SS_6b_PG1_Algorithmen_Datenstrukturen_Suchen_Sortieren_Stud_01_21.pdf
13SS_6b_PG1_Algorithmen_Datenstrukturen_Suchen_Sortieren_Stud_01_21.pdf
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
Implementierung von Bubble-Sort<br />
FB Informatik<br />
Prof. Dr. R.Nitsch<br />
/* BubbleSort - Sorts a subsequence [pfirst,plast)<br />
@param pfirst pointer to first element of subsequence<br />
@param plast pointer to one-past-the-end element of the subsequence */<br />
// version 1 (with pointer)<br />
void bubbleSort( int* pfirst, int* plast ) {<br />
}<br />
for ( int* plastu=plast-1; plastu>pfirst; --plastu )<br />
for ( int* pp=pfirst ; pp