reorder list in O(2N)
July's solutions