After sortArrayBubble you have the array correctly sorted in ascending order by the [row] element (the first "dimension). But sortArrayBubble1 just reverses that order, so it's not doing what you want.
Check that I'm correct in this.
Now write down what you have in the array after the first, correct sort: I'll start:
 = 1
 = 7
 = 1
 = 2
So what elements do you need to sort? What do they all have in common?
All things are lawful, but not all things are profitable.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database