F
free4ziyi
Hi,
My function should takes an array containing the set of all integers in
the range of [a,b] and shuffles it into random order.
For example, a = 1, b = 5, n = 3 and the random orders:
1.[3,4,2,1,5] 2.[2,5,1,4,3] 3.[1,4,2,3,5]
Then the most similar pair of sequences is 1 and 3, since they have the
same value in 3 position.
My problem is should I do to declare the array without knowing the
array size? The compiler keeps getting error because I declare and
array like int array[];
Can anyone help me with this?
Cheers!
J
My function should takes an array containing the set of all integers in
the range of [a,b] and shuffles it into random order.
For example, a = 1, b = 5, n = 3 and the random orders:
1.[3,4,2,1,5] 2.[2,5,1,4,3] 3.[1,4,2,3,5]
Then the most similar pair of sequences is 1 and 3, since they have the
same value in 3 position.
My problem is should I do to declare the array without knowing the
array size? The compiler keeps getting error because I declare and
array like int array[];
Can anyone help me with this?
Cheers!
J