Anonymous user
Sorting algorithms/Bubble sort: Difference between revisions
Updated D code
(Updated D code) |
|||
Line 638:
=={{header|D}}==
<lang d>import std.stdio, std.algorithm;
void bubbleSort(
int itemCount = data.length;
bool hasChanged = false;
do {
hasChanged = false;
Line 653:
} while (hasChanged);
}
void main() {
auto array = [28, 44, 46, 24, 19, 2, 17, 11, 25, 4];
|