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

@ -7,10 +7,10 @@ extension op
{
var copy := self.clone();
for(int i := 0, i < copy.Length, i += 1)
for(int i := 0; i < copy.Length; i += 1)
{
int k := i;
for(int j := i + 1, j < copy.Length, j += 1)
for(int j := i + 1; j < copy.Length; j += 1)
{
if (copy[j] < copy[k])
{

View file

@ -15,8 +15,8 @@ var selectionSort = Fn.new { |a|
}
}
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)")
selectionSort.call(a)
System.print("After : %(a)")

View file

@ -1,7 +1,7 @@
import "/sort" for Sort
import "./sort" for Sort
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)")
Sort.selection(a)
System.print("After : %(a)")