> From: Kevin O'Connor [mailto:kevin@koconnor.net] > On Sat, Jul 20, 2002 at 02:06:29AM -0400, Guido van Rossum wrote: > > >The only change I would make would be to make heap[0] the > > lowest value rather than the highest. > > I agree this appears more natural, but a priority queue that pops the > lowest priority item is a bit odd. I'm in two minds about this. My first thought is that the *first* item (heap[0]) should be the highest priority. OTOH, if it were a sorted list, list[0] would return the *lowest* priority. So i think for consistency heap[0] must return the lowest priority. Tim Delaney
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4