Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Bubble Sort nochmal (https://www.delphipraxis.net/41780-bubble-sort-nochmal.html)

cool2005 8. Mär 2005 14:35


Bubble Sort nochmal
 
hi leute...

würde gerne wissen was diese zwei zeilen machen :wall:

Delphi-Quellcode:
procedure TDaten.bubblesort(var A:TFeld;anzahl : integer);
var i,j : integer;
begin
for i:= 2 to anzahl do <==================== ?????
for j := anzahl downto i do <=============== ?????
if A[j-1]>A[j] then
swap(A[j-1],A[j]);
end;
dankkkkkkkkkkke im voraus :mrgreen:

bye

Bernhard Geyer 8. Mär 2005 14:38

Re: Bubble Sort nochmal
 
Dann schau dir mal den formalen Algorithmus bei Wikipedia an.

cool2005 8. Mär 2005 14:40

Re: Bubble Sort nochmal
 
hab ich schon...

der brachte mir nichts...... :duck:

ich weiß ist peinlich...doch hab zurzeit null schimmerrrrrrr.

Luckie 8. Mär 2005 14:42

Re: Bubble Sort nochmal
 
Dann guck dir das Sortier-Tutorial von Daniel hier im Forum an.

cool2005 8. Mär 2005 14:42

Re: Bubble Sort nochmal
 
moment...habs gecheckt :mrgreen:

danke danke danke :dancer:

ciaoooooooo :hi:


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:24 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz