insertion sort asc/desc and sorted priority queue