Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
to split :size :front :list
|
||||
if :size < 1 [output list :front :list]
|
||||
output split :size-1 (lput first :list :front) (butfirst :list)
|
||||
end
|
||||
|
||||
to merge :small :large
|
||||
if empty? :small [output :large]
|
||||
ifelse lessequal? first :small first :large ~
|
||||
[output fput first :small merge butfirst :small :large] ~
|
||||
[output fput first :large merge butfirst :large :small]
|
||||
end
|
||||
|
||||
to mergesort :list
|
||||
localmake "half split (count :list) / 2 [] :list
|
||||
if empty? first :half [output :list]
|
||||
output merge mergesort first :half mergesort last :half
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue