Hacker News new | ask | show | jobs
by taneq 2644 days ago
Isn't a priority queue implicitly sorted?
1 comments

Yes. I don't think your parent post meant to imply otherwise.

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

Ah right, I read 'more accurate than sorting before adding' as 'without sorting before adding' and missed that it was more about rounding errors than the sorting.