I have a 2D array make of std::vector and I want to print out the contents in a certain patterns. There are two pattern to access the each row of the 2D array.
1. Each row is read in the forward manner.
2. Each row is read in the reverse manner.
Each of the above pattern is chosen at random at the beginning and then they alternates until all the rows are accessed.
I have encapsulated each of the read pattern inside a function. But I am not sure how to choose each of the function alternately.