September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,20 +0,0 @@
function list = bubbleSort(list)
hasChanged = true;
itemCount = numel(list);
while(hasChanged)
hasChanged = false;
itemCount = itemCount - 1;
for index = (1:itemCount)
if(list(index) > list(index+1))
list([index index+1]) = list([index+1 index]); %swap
hasChanged = true;
end %if
end %for
end %while
end %bubbleSort

View file

@ -1,5 +0,0 @@
bubbleSort([5 3 8 4 9 7 6 2 1])
ans =
1 2 3 4 5 6 7 8 9