Weave Merge sort

Weave Merge sort is a sorting algorithm

Algorithm
To weave two lists together, alternately interleave them, with the second list as the first element, e.g.  becomes. This algorithm is also called in-shuffle. The simplest way to do so is to move each elements from the second list, from left-to-right, to the appropriate place.

To sort using Weave Merge, recursively sort the left and right halves of the list. Then, the two halves are weaved. Insertion sort is finally used to sort the list.

Complexity
The weaving operation described above takes $$O(n^2)$$ time. Furthermore, in the worst case scenario where an already sorted list is weaved, insertion sort takes $$O(n^2)$$ time to sort it again. As for merge sorts, the depth is about $$\log n$$. This leads to $$(O(n^2) + O(n^2)) \cdot \log n = O(n^2 \log n)$$. On random data, insertion sort gets closer to $$O(n)$$, but a modification of the weave process must be done in order to take advantage of it.

Improved Weave Merge sort
The weaving operation is decreased to $$O(n \log n)$$ using a recursive process. The inserting process is not modified though.

Optimized Weave Merge sort
The weave now takes $$O(n)$$ time. Inserting is now modified to make $$O(n)$$ comparisons worst case.