I am writing a swift application so this question would be best answered in swift or any other language if the logic is the same.
I have a 2D array and I want to iterate through each even row as normal 0 - x however every odd row I would like to iterate in the opposite direction of x - 0.
I haven't included any code as it doesn't seem necessary. Any answers would be appreciated - code would be appreciated but isn't required I need to know the method to achieve this desired functionality.