Basically, we will have 2 heads, one looks at the end of the array, one at the beginning.
vv {-9, -7, -3, 1, 6, 8, 14}
We compare the absolute value of the two records that our heads point to and insert them into our new sorted array. So, it will be 14.
New array: {14}
Then we move the head of the element that we selected closer to the center. So, we move our head, pointing to 14-8.
vv {-9, -7, -3, 1, 6, 8, 14}
Then we repeat the process, inserting the larger of 2 absolute values ββat the beginning of our new, sorted array. Here it will be -9, as | -9 | > | 8 |
New array: {-9, 14}
And after we move our head again:
vv {-9, -7, -3, 1, 6, 8, 14}
Repeat until both heads meet in the center.