Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,20 +1,20 @@
|
|||
OrderedCollection extend [
|
||||
stoogeSortFrom: i to: j [
|
||||
(self at: j) < (self at: i)
|
||||
ifTrue: [ self swapElement: i with: j ].
|
||||
j - i > 1
|
||||
(self at: j) < (self at: i)
|
||||
ifTrue: [ self swapElement: i with: j ].
|
||||
j - i > 1
|
||||
ifTrue: [
|
||||
|t| t := (j - i + 1)//3.
|
||||
self stoogeSortFrom: i to: (j-t).
|
||||
self stoogeSortFrom: (i+t) to: j.
|
||||
self stoogeSortFrom: i to: (j-t)
|
||||
|t| t := (j - i + 1)//3.
|
||||
self stoogeSortFrom: i to: (j-t).
|
||||
self stoogeSortFrom: (i+t) to: j.
|
||||
self stoogeSortFrom: i to: (j-t)
|
||||
]
|
||||
]
|
||||
stoogeSort [ self stoogeSortFrom: 1 to: (self size) ]
|
||||
swapElement: i with: j [
|
||||
|t| t := self at: i.
|
||||
|t| t := self at: i.
|
||||
self at: i put: (self at: j).
|
||||
self at: j put: t
|
||||
self at: j put: t
|
||||
]
|
||||
].
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue