Public:
Void wiggleSort (vector
Int left=0, right=nums. The size () - 1;
Int n=right/2;
Int mid=quicksort (left, right, nums, n);
for(int i=1; i<((right + 1)/2); I++) {
If (I % 2!=0) {
Swap (nums [I], nums -i [right]);
}
}
}
{int swap (int n, int m)
int t;
T=n;
N=m;
M=t;
}
Int quicksort (int left, int right, vector
Int I=left, j=right;
Int key=nums [left];
While (i
}
If (nums [j]
i++;
}
While (i
}
If (nums [I]
j--;
}
}
Nums [I]=key;
If (I==n) return nums [I];
Else if (i
}
};
WiggleSort (vector