Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -10,7 +10,7 @@ proc stsort left right . d[] .
.
.
for i = 1 to 100
d[] &= random 1000
d[] &= randint 1000
.
stsort 1 len d[] d[]
print d[]

View file

@ -24,7 +24,7 @@ extension op
public program()
{
var list := new Range(0, 15).selectBy:(n => randomGenerator.nextInt(20)).toArray();
var list := new Range(0, 15).selectBy::(n => randomGenerator.nextInt(20)).toArray();
console.printLine("before:", list.asEnumerable());
console.printLine("after:", list.stoogeSort().asEnumerable())

View file

@ -13,8 +13,8 @@ stoogeSort = Fn.new { |a, i, j|
}
}
var as = [ [4, 65, 2, -31, 0, 99, 2, 83, 782, 1], [7, 5, 2, 6, 1, 4, 2, 6, 3] ]
for (a in as) {
var array = [ [4, 65, 2, -31, 0, 99, 2, 83, 782, 1], [7, 5, 2, 6, 1, 4, 2, 6, 3] ]
for (a in array) {
System.print("Before: %(a)")
stoogeSort.call(a, 0, a.count-1)
System.print("After : %(a)")