10-28-2024, 09:50 PM
I assume that the LDArrays cannot be output with Textwindow.WriteLine(). Only the internal name of the array appears. The sort function is OK.
That would be the simplest way of sorting.
But I think that the numbered challenges should be solved without extensions.
This is probably more about the Quicksort algorithm and a possible comparison with an AI solution.
Have fun
Scout
Code:
name = LDArray.Create(10)
For i = 1 To 10
value = Math.GetRandomNumber(10)
result = LDArray.SetValue( name, i , value)
TextWindow.WriteLine("Name [ " + i + " ] :" + value)
EndFor
result=LDArray.Sort(name)
TextWindow.WriteLine("Result Sort: " + result)
For i = 1 To 10
value = LDArray.GetValue( name, i )
TextWindow.WriteLine("Name [ " + i + " ] :" + value)
EndFor
That would be the simplest way of sorting.
But I think that the numbered challenges should be solved without extensions.
This is probably more about the Quicksort algorithm and a possible comparison with an AI solution.
Have fun
Scout