Re: Visual Basic Shell Sort
Welcome to the forums.
What are you having problems with, the random numbers or the algorithm?
If it's the former:
vb Code:
Dim xRan(1000)
Dim N As Integer
Randomize 'This statement initializes the seed
For N = 1 To 1000
xRan(N - 1) = Rnd()
Next
As for the algorithm, you may want to take a look at this article from the Wikipedia,
http://en.wikipedia.org/wiki/Shell_sort
There's code in various programming languages -unfortunately not in VB- but maybe you can convert it.
Re: Visual Basic Shell Sort
Actually there are loads of sites with VB code. For example,
http://vbnet.mvps.org/index.html?cod.../qscompare.htm
The last subroutine at the bottom is for Shell sort.
Re: Visual Basic Shell Sort