public static void main(String args[]) {
        WiggleSort ws = new WiggleSort();
        int input[] =  {6, 2, 1, 6, 8, 9, 6};
        ws.wiggleSort2(input);
        System.out.print(Arrays.toString(input));
    }
Date 03/23/2016
@author Tushar Roy

Convert an unsorted array into an array of form num[0] < num[1] > nums[2] < num[3]....

Time complexity O(n) - This depends on KthElementInArray time
Space complexity O(1)

https://leetcode.com/problems/wiggle-sort/
https://leetcode.com/problems/wiggle-sort-ii/
src/com/interview/array/WiggleSort.java