and a tips :
FOR i = 1 TO (matrix.Count - 1)
you can do :
FOR i = 1 TO matrix.Max
2010/5/7 Fabián Flores Vadell :
> 2010/5/4, Leonardo Miliani :
>> I'm working with this little piece of code, it's the Insertion Sort:
>>
>> PUBLIC SUB InsertionSort(matrix AS String[])
>> DIM i, j AS Integer
>>
2010/5/4, Leonardo Miliani :
> I'm working with this little piece of code, it's the Insertion Sort:
>
> PUBLIC SUB InsertionSort(matrix AS String[])
> DIM i, j AS Integer
> DIM x AS String
>
> FOR i = 1 TO (matrix.Count - 1)
> x = matrix[i]
> j = i - 1
> WHILE j >= 0 AND matrix[j] > x
> I'm working with this little piece of code, it's the Insertion Sort:
>
> PUBLIC SUB InsertionSort(matrix AS String[])
> DIM i, j AS Integer
> DIM x AS String
>
> FOR i = 1 TO (matrix.Count - 1)
> x = matrix[i]
> j = i - 1
> WHILE j >= 0 AND matrix[j] > x
> matrix[j + 1] = ma
I'm working with this little piece of code, it's the Insertion Sort:
PUBLIC SUB InsertionSort(matrix AS String[])
DIM i, j AS Integer
DIM x AS String
FOR i = 1 TO (matrix.Count - 1)
x = matrix[i]
j = i - 1
WHILE j >= 0 AND matrix[j] > x
matrix[j + 1] = matrix[j]
j -= 1