News for hackers. Stuff that matters.
Re:Ask YC: do you use what you learned in school? by fgb on Friday February 22, 2008 @08:28AM (#121240)
All the time. Just recently one of guys I work with got stuck because he was using an STL priority queue to maintain a scheduler's data. The data was keyed on the time a scheduled event needed to run. The problem was that sometimes an event's time needed to change. Normally theses priority queues do not let you change items on the fly. Things get added and they come out based on their priority. He figured out how to override this behavior but couldn't understand why the priority queue was broken after he modified an item inside the queue directly. So, I had to explain to him how heaps and priority queues worked.

There are no comments on this comment yet.