How to wiggle sort an array in linear time complexity?
Some characterizations of wiggle-sort
Skip this section if you would like to see the algorithms right away.$\def\A{\mathcal A}$ $\def\S{\mathcal S}$
Given an array $\A=(\A_0,\A_1, \cdots, \A_{n-1})$ of numbers, let us call the $\lceil n/2\rceil$-th smallest entry in $\A$ as well as each entry that is equal to that entry a median of $\A$. (This definition of median differs slightly from its usual definition when $n$ is even. For example, the median of $(3,4)$ is $3$ instead of $3.5$)
Call $A$ wiggle-sorted if $\A_0&lt;\A_1&gt;\A_2&lt;\A_3&gt;\A_4&lt;\cdots$. Call $A$ wiggle-sortable if we can rearrange its entries so that it becomes wiggle-sorted. An array is always wiggle-sortable if all numbers in it are distinct. If all numbers are not distinct, the array may or may not be wiggle-sortable. For example, $[1,2,2]$ is not wiggle-sortable while $[1,1,2]$ is wiggle-sortable.
A permutation of $\{0,1,\cdots, n-1\}$, $\sigma$, is called a wiggling permutation if $\sigma(\A)=(\A_{\sigma(0)},\A_{\sigma(1)}, \cdots, \A_{\sigma(n-1)})$ is wiggle-sorted as long as $\A$ is sorted.
For all $n$, define a permutation $$w_n=\pmatrix { 0 &amp;1 &amp;2 &amp;3 &amp;4&amp;5&amp;\cdots\\m &amp;n-1 &amp;m-1 &amp;n-2 &amp;m-2 &amp;n-3 &amp;\cdots},$$
where $m=\lceil n/2\rceil-1$. For example,
$$w_5=\pmatrix { 0 &amp;1 &amp;2 &amp;3 &amp;4 \\2 &amp;4 &amp;1 &amp;3 &amp;0},$$
$$w_8=\pmatrix { 0 &amp;1 &amp;2 &amp;3 &amp;4&amp;5&amp;6&amp;7\\3 &amp;7 &amp;2 &amp;6 &amp;1 &amp;5 &amp;0 &amp;4}.$$
Characterization of wiggle-sortable arrays. The following propositions are equivalent.

$\A$ is wiggle-sortable of size $n$.
(Not too many medians) The number of medians of $A$ is no more than $\lceil n/2\rceil$.
If we have just sorted $A$ (in the usual sense), then $w_n(\A)$ is wiggle-sorted. 


Uniqueness of wiggling permutation. For even size $n$, $w_n$ is the unique wiggle permutation. For odd size $n$, $w_n$ and $\overline{w_n}$ are the only two wiggling permutations, where $\overline{w_n}$ is the &quot;reverse&quot; of $w_n$, i.e., $\overline{w_n}(i)=n-1-w_n(i)$ for all $i$.

This uniqueness explains the fact that all solutions to the wiggle-sort problem arrange the given array the same way basically.

Here is the problem again: given an array of numbers, how can we wiggle-sort it?
A simple approach that runs in $O(n\log n)$ time
The easiest approach to implement, as illustrated in the question, is to sort the array, explicitly or implicitly, and rearrange the array.
Input: an array $\A$ of $n$ numbers with indices $0, 1, n-1$.
Output: None if $\A$ is not wiggle-sortable. Otherwise, return $\A$ that has been wiggle-sorted.
Procedure:

Sort $A$ into a temporary array. (Most sorting libraries run in $O(n\log n)$ time on average.)
Copy the largest number, the next largest number, and so on of the temporary array to $A$ at index $1, 3, 5,\cdots$ until the index is out of bound.
Copy the next largest number, the next largest number, and so on of the temporary array to $A$ at index $0, 2, 4,\cdots$ until all numbers are exhausted. 
Check if the $\A$ is wiggle-sorted. Return accordingly.

# assume the given array, nums is wiggle-sortable
def wiggle_sort(nums):
    arr = sorted(nums)
    for i in range(1, len(nums), 2): nums[i] = arr.pop()
    for i in range(0, len(nums), 2): nums[i] = arr.pop()


To achieve better performance, we have to avoid sorting the array.

The outline of a faster algorithm
Procedure:

find the median of $\A$ by some $O(n)$ algorithm.
Count the number of all medians. If it is greater than $\lceil n/2\rceil$, return None.
Put all entries larger than the median in positions with odd indices,  $1, 3, 5,\cdots$ in that order.
Put all entries smaller than the median in positions with even indices from the largest-even-indice going downwards.
Fill the remaining entries of $A$ with the median. Return $\A$.

The problem is shifted to how to find the median and arrange the numbers
Find the median in linear time and constant space
To implement the algorithm in linear time and constant space we need to find the median in linear time and constant space.
There are various ways to achieve that deterministically, for example, linear-time in-place selection in less than 3n comparisons, 2005 and linear-time in-place selection with ⋅ element moves, 2006. Unfortunately, all these algorithms are somewhat complicated.
We can find the median in average linear time and constant space using a simple algorithm, quickselect. Here is the python code.
def k_smallest(nums, k, start, end):
    &quot;&quot;&quot;
    Returns the k-th smallest number in nums[start:end+1].
    &quot;&quot;&quot;
    if k &lt;= 0 or end - start &lt; k - 1:
        return None

    k = start + k - 1

    while True:
        if start &gt;= end:
            return nums[start]

        # pivot = nums[random.randint(start, end)]
        pivot = nums[end]
        left, right, m = start, end, start
        while m &lt;= right:
            if nums[m] &lt; pivot:
                nums[left], nums[m] = nums[m], nums[left]
                left += 1
                m += 1
            elif nums[m] &gt; pivot:
                nums[right], nums[m] = nums[m], nums[right]
                right -= 1
            else:
                m += 1
        if left &lt;= k &lt;= right:
            return pivot
        elif k &lt; left:
            end = left - 1
        else:  # k &gt; right
            start = right + 1

m = k_smallest(nums, (n + 1) // 2, 0, len(nums) - 1)  # m is the median

If we relax the space requirement slightly, we can find the median in linear-time and logarithmic-space using the median of medians algorithm.
Arrange the numbers in linear time and constant space
Once the median has been found, the problem is shifted to arrange the number as specified. Any reasonable implementation will run linear time. What is not obvious is how to do it in constant space as well.
We can imagine the entries of $\A$ is actually arranged in the memory consecutively as $A_1$, $A_3$, $A_5$, $\cdots$, $A_{n_1}$, $A_0$, $A_2$, $A_4$, $\cdots$, $A_{n_0}$, where $n_1$ and $n_0$ are the largest odd and even number not exceeding $n$.  Here is the explicit access pattern when $n=8$:
$\quad$ Accessing memory at index 0 actually accesses $A_1$.
$\quad$ Accessing memory at index 1 actually accesses $A_3$.
$\quad$ Accessing memory at index 2 actually accesses $A_5$.
$\quad$ Accessing memory at index 3 actually accesses $A_7$.
$\quad$ Accessing memory at index 4 actually accesses $A_0$.
$\quad$ Accessing memory at index 5 actually accesses $A_2$.
$\quad$ Accessing memory at index 6 actually accesses $A_4$.
$\quad$ Accessing memory at index 7 actually accesses $A_6$.
Or, in general, the memory at the index $p$ refers to $\A_{(1+2p)\pmod{n\,|\, 1}}$.
With this mapping between indices, the problem is transformed to the Dutch national flag problem or, what is the same, the tri-color problem on LeetCode. We can apply the tri-color algorithm almost verbatim, which runs in $O(n)$ time and $O(1)$ space (thanks to StefanPochmann for his post).
# Put numbers larger than pivot at smallest odd-indices. 
# Put numbers smaller than pivot at largest even-indices. 
def tri_color_clustering(nums, pivot):
    n = len(nums)

    def map_index(p):
        return (1 + 2 * p) % (n | 1)

    i, j, k = 0, 0, n - 1
    while j &lt;= k:
        if nums[map_index(j)] &gt; pivot:
            nums[map_index(j)], nums[map_index(i)] = nums[map_index(i)], nums[map_index(j)]
            i += 1
            j += 1
        elif nums[map_index(j)] &lt; pivot:
            nums[map_index(j)], nums[map_index(k)] = nums[map_index(k)], nums[map_index(j)]
            k -= 1
        else:
            j += 1
    # print(nums)



A previous version of this answer shows a simple and fast algorithm to wiggle sort an array in $O(n)$ time and $O(1)$ space, assuming all numbers in the given array are distinct.