Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Algorithmen, Datenstrukturen und Klassendesign (https://www.delphipraxis.net/78-algorithmen-datenstrukturen-und-klassendesign/)
-   -   BubbleSort1 vs. BubbleSort2 (https://www.delphipraxis.net/161402-bubblesort1-vs-bubblesort2.html)

Gargoyl 7. Jul 2011 14:15

AW: BubbleSort1 vs. BubbleSort2
 
Zitat:

Zitat von Woyzeck (Beitrag 1110545)
Zitat:

Zitat von Gargoyl (Beitrag 1109530)
Also Bubblesort1 hat immer eine konstante Laufzeit, egal ob die Liste bereits sortiert ist oder nicht. Also best case = average case = worst case. Und die Laufzeit ist immer in O(n²).[...]

konstante Laufzeit und O(n²)...
:shock:

Mir ist klar was du meinst, aber der Begriff ist wohl falsch gewählt an der Stelle.

:oops: ja unglücklich formuliert von mir. Ist mir gar nicht aufgefallen. Ich meinte natürlich dass die Laufzeit immer gleich ist, egal ob die Liste sortiert ist oder nicht. Bei gleicher Listen-Länge natürlich. Danke für die Korrektur.

Zitat:

Zitat von Gargoyl (Beitrag 1109530)
Also Bubblesort1 hat immer eine konstante die gleiche Laufzeit (bei gleicher Listenlänge), egal ob die Liste bereits sortiert ist oder nicht. Also best case = average case = worst case. Und die Laufzeit ist immer in O(n²).[...]


ldelafosse 11. Jul 2011 17:37

AW: BubbleSort1 vs. BubbleSort2
 
[QUOTE=Deep-Sea;1109588]Hier mal ein Screenshot aus meiner Testsoftware:
Anhang 34559
Mein Code ist ggf. etwas verwirrend, er ist halt aus meiner Testsoftware ...
QUOTE]

Is your Testsoftaware available?

It's look pretty good, and to have a lot of informations on each sort type of algorithm.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:52 Uhr.
Seite 2 von 2     12   

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