I tried to improvise a random number generator by using the "Bays & Durham Randomization by Shuffling" algorithm. I followed a tutorial online and made this code:

```
public int[] GenerateRandomSequence_Improved(int n, int min, int max)
{
int[] seq = new int[n];
for(int i = 0; i < n; i++)
{
int rand = GenerateNextRandomNumber(min, max);
rand = min + rand % (max + 1 - min);
seq[i] = rand;
}
return seq;
}
```

I wanna know if I did it correctly or not..

EDIT: This is the code for the GenerateNextRandomNumber method

```
public int GenerateNextRandomNumber(int min, int max)
{
return cSharpRNG.Next(min,max);
}
```

Here is what I believe proper implementation of the Bays-Durham shuffling. Warning wrt bias in indexing due to modulo operation is right though.

.NET Core 2.2, x64 Win10