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

@ -11,11 +11,11 @@ extension op
int[] count := new int[](max - min + 1);
int z := 0;
count.populate:(int i => 0);
count.populate::(int i => 0);
for(int i := 0, i < self.Length, i += 1) { count[self[i] - min] := count[self[i] - min] + 1 };
for(int i := 0; i < self.Length; i += 1) { count[self[i] - min] := count[self[i] - min] + 1 };
for(int i := min, i <= max, i += 1)
for(int i := min; i <= max; i += 1)
{
while (count[i - min] > 0)
{
@ -30,7 +30,7 @@ extension op
public program()
{
var list := new Range(0, 10).selectBy:(i => randomGenerator.nextInt(10)).toArray();
var list := new Range(0, 10).selectBy::(i => randomGenerator.nextInt(10)).toArray();
console.printLine("before:", list.asEnumerable());
console.printLine("after :", list.countingSort().asEnumerable())