Autor Beitrag
stefandraeger28
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Di 26.08.08 20:08 
Hi,

ich habe da mal eine Herrausforderung:

es gibt ein Array:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
type
  TBenutzer = record
  Benutzername : string;
  URL : array [1..5000] of string;
  Download : array [1..5000] of integer;
  Upload : array [1..5000] of integer;
end;

var
  my_benutzer : array [1..1000] of TBenutzer

jetzt möchte ich dieses Array gerne sortieren und zwar nach dem Download.

Habe echt keinen plan wie ich das angehen soll.

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 26.08.08 20:20 
Moin und :welcome: im Forum!

user profile iconstefandraeger28 hat folgendes geschrieben:
jetzt möchte ich dieses Array gerne sortieren und zwar nach dem Download.

Habe echt keinen plan wie ich das angehen soll.
Dann solltest du hier mal reinsehen, da steht, wie man das einfach lösen kann. :les: ;)

Und anschließend kann du dann hier mal nach Suche in: Delphi-Forum, Delphi-Library BUBBLESORT suchen, da findet sich auch bestimmt Code, den man verwenden könnte. :)

Die nächste Anfrage bitte mit einer konkreten Frage starten und deinen bisherigen Code/Algorithmus dazu tun. :idea: :D

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Jerk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 251

Vista Ultimate, Ubuntu
Turbo Delphi 2006
BeitragVerfasst: Di 26.08.08 20:29 
Warum nicht Quicksort???
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Di 26.08.08 20:31 
user profile iconJerk hat folgendes geschrieben:
Warum nicht Quicksort???

Zum einem, weil er Anfänger ist. Aber warum gerade Quicksort? Es gibt eine Vielzahl anderer und auch schnellerer Algorithmen. ;)
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 26.08.08 20:31 
Moin!

user profile iconJerk hat folgendes geschrieben:
Warum nicht Quicksort???
Jemand, der gar keinen Plan hat, sollte am besten die iterative Version von Quicksort implementieren, das ist nämlich wesentlich einfacher... :nut: :|

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
stefandraeger28 Threadstarter
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Di 26.08.08 20:54 
Titel: Anfänger ??
mmh also als Anfänger möchte ich mich ja mit meinen 16 Jahren Programmierkenntnissen nicht gerade nennen.

Aber danke für den Link den habe ich aber auch gefunden.
Bin nur nicht daraus schlau geworden.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 26.08.08 21:08 
Moin!

Hm :? wenn du schon so lange programmierst, aber keinen Bubble-Sort implementiert kriegst, dann frage ich mich, was du da 16 Jahre lang programmiert hast... :gruebel: SPS? oder APL? ;)

Wo hakt es denn genau? Bei deiner unspezifischen Frage muss man ja quasi den fertigen Code liefern. 8)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.