CreateRandomCyclicArray

int[] CreateRandomCyclicArray(int inSize)

Description

Returns an integers array, containing numbers in the range [1,inSize], in a cyclic order, starting at a random number in that range.

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inSize Int32 Size (elements amount) of array

Return Type

int[]

 

Example

CreateRandomCyclicArray(5), will return an array with a size of 5 (5 cells); the array's values content are the numbers 1,2,3,4,5, placed in a cyclic order with a random starting point. For example, this can be the array: [3,4,5,1,2]

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.