Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,17 +1,17 @@
|
|||
function gnomeSort(array:Array)
|
||||
{
|
||||
var pos:uint = 0;
|
||||
while(pos < array.length)
|
||||
{
|
||||
if(pos == 0 || array[pos] >= array[pos-1])
|
||||
pos++;
|
||||
else
|
||||
{
|
||||
var tmp = array[pos];
|
||||
array[pos] = array[pos-1];
|
||||
array[pos-1] = tmp;
|
||||
pos--;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
var pos:uint = 0;
|
||||
while(pos < array.length)
|
||||
{
|
||||
if(pos == 0 || array[pos] >= array[pos-1])
|
||||
pos++;
|
||||
else
|
||||
{
|
||||
var tmp = array[pos];
|
||||
array[pos] = array[pos-1];
|
||||
array[pos-1] = tmp;
|
||||
pos--;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue