public static void main(String args[]) {
        int input[] = {-5, -2, 5, 2, 4, 7, 1, 8, 0, -8};
        PositiveAndNegativeNumberAlternativelyMaintainingOrder pss = new PositiveAndNegativeNumberAlternativelyMaintainingOrder();
        pss.rearrange(input);
        Arrays.stream(input).forEach(i -> System.out.print(i + " "));
    }
Date 12/31/2015
@author Tushar Roy

Given an array of positive and negative integers arrange them alternatively maintaining initial order.
If there are more +ve or -ve integer then push them to the end together.

Time complexity is O(n)
Space complexity is O(1)

http://www.geeksforgeeks.org/rearrange-array-alternating-positive-negative-items-o1-extra-space/
src/com/interview/array/PositiveAndNegativeNumberAlternativelyMaintainingOrder.java