|
|||||||||||||||||||||||||||||||||||||||||
| ISBN: 3446412603 ISBN: 3446412603 ISBN: 3446412603 ISBN: 3446412603 | |||||||||||||||||||||||||||||||||||||||||
|
Wir empfehlen: | ||||||||||||||||||||||||||||||||||||||||
Selection Sort (Sortiern durch Auswahl)Beschreibung
Programmcodeprocedure SelectionSort ( var f :
TArray; HighIndex : integer ) : string;
var i, j, min :
integer;
begin
for i := 0 to HighIndex-1
// äußere Schleife
do begin
min :=
i;
for j := i+1 to HighIndex do
if f[j] < f[min] then min := j; // innere Schleife
Swap (f[i],
f[min]);
end;
end; //
SelectionSort
Aufwandsabschätzungmittlerer-Aufwand:
Daraus folgt der Aufwand
.worst-case-Aufwand:
Der maximale Aufwand beträgt ebenfalls O(n2).
|
|
||||||||||||||||||||||||||||||||||||||||
| |<< First < Previous Index Next > Last >>| | |||||||||||||||||||||||||||||||||||||||||
|
Back to the topic sites: StudyPaper.com/Startseite/Computer/Informatik StudyPaper.com/Startseite/Wissenschaft/Wirtschaftswissenschaften StudyPaper.com/Startseite External Links to this site are permitted without prior consent. | |||||||||||||||||||||||||||||||||||||||||
| Home | deutsch | Set bookmark | Send a friend a link | Copyright © | Impressum | |||||||||||||||||||||||||||||||||||||||||