M
moni
Gast
wie kann ich mir flags vorstellen
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
moni hat gesagt.:im zusammenhang von arrays
ich verstehe diesen sortier algorithmus nicht
//Sortier-Algorithmus
Code:for (i = 0; i < array2sort.length-1; i++){ flag = 0; for (j = array2sort.length-1; j > i; j--){ ++verg; if (array2sort[j] < array2sort[j-1]){ tmp = array2sort[j]; array2sort[j] = array2sort[j-1]; array2sort[j-1] = tmp; ++tauschop; flag = 1; } } if (flag == 0) break;