Complete the following function.
void swapPosNeg(ArrayListA) { // pre: the array has been initialized // post: the elements of the array have been rearranged without sorting so that all // the negative numbers appear to the left of all the non-negative numbers int n = A.size( ); int index = 0; while ( index < n - 1 ) { if ( A.get(index) < 0 ) // skip it ______________; else if ( _____________ ) // skip it ______________; else // if both are out of place - swap them { ___________________; ___________________; ___________________; } // end of third branch } // end of while loop } // end of function