If we pivot the array at the mid-point then worst case is all the negative numbers are after the positive numbers. Now take two pointers one for the front and one for the rear.Every time you have to make a exchange and when front pointer exceeds rear we stop. So in worst case n/2 exchanges.

If we pivot the array at the mid-point then worst case is all the negative numbers are after the positive numbers. Now take two pointers one for the front and one for the rear.Every time you have to make a exchange and when front pointer exceeds rear we stop. So in worst case n/2 exchanges.

Ans:- (D)