public void rearrange(int input[]) {
        boolean isLess = true;
        for (int i = 0; i < input.length - 1; i++) {
            if(isLess) {
                if (input[i] > input[i+1]) {
                    swap(input, i, i+1);
                }
            } else {
                if (input[i] < input[i+1]) {
                    swap(input, i, i+1);
                }
            }
            isLess = !isLess;
        }
    }
Date 12/30/2015
@author Tushar Roy

Given an array of unique elements rearrange the array to be a < b > c < d > e form

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

http://www.geeksforgeeks.org/convert-array-into-zig-zag-fashion/
src/com/interview/array/ZigZagArrangement.java