dequeue sort