If I have this array of integers :
int[] columns_index = { 2, 3, 4};
How can i repeat this sequence according to given number (size)?
For example :
if i give u 4 as a size then the array will be
{2,3,4,2}
if i give u 5 as a size then the array will be
{2,3,4,2,3}
if i give u 6 as a size then the array will be
{2,3,4,2,3,4}
if i give u 7 as a size then the array will be
{2,3,4,2,3,4,2}
And so on …
Just use the modulo operator to iterate through the
columns_index