The priority queue approach boils down to "sort after every addition, instead of just once at the beginning".