Re: Skip Lists and Priority Queues?
- From: Randy Howard <randyhoward@xxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 18:14:11 GMT
Oliver Wong wrote
(in article <5f0Nf.7629$Cp4.2596@edtnps90>):
"Leslie Sanford" <jabberdabber@xxxxxxxxxxxxxxxxx> wrote in message
news:9eudnUdbPbaRFZnZRVn-iQ@xxxxxxxxxxxxxx
I was thinking about implementing a priority queue using a skip list. A
cursory examination makes me think that a skip list will perform well. For
one, dequeing(sp) simply requires removing the first node in the list and
updating the header. Inserting is comparable to inserting into a balanced
tree, I believe.
Would this be acceptable performance for a priority queue?
Part of my reason for wanting to use a skip list is that I'm familiar with
it having implemented skip lists in several languages.
Didn't know what a Skip List was, so I read your article on
codeproject.com, and it looks like a reasonable data structure, especially
with p = 1/2.
Didn't Pugh come up with them about 15 years ago? They looked
promising on paper, but in practice can be worse performers than
older data structures, such as various forms of balanced trees.
It's been at least a decade since I played with them, but they
did have some advantages with respect to memory consumption in
resource-constrained environments.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
.
- Follow-Ups:
- Re: Skip Lists and Priority Queues?
- From: Ben Pfaff
- Re: Skip Lists and Priority Queues?
- References:
- Skip Lists and Priority Queues?
- From: Leslie Sanford
- Re: Skip Lists and Priority Queues?
- From: Oliver Wong
- Skip Lists and Priority Queues?
- Prev by Date: Re: Skip Lists and Priority Queues?
- Next by Date: Re: Skip Lists and Priority Queues?
- Previous by thread: Re: Skip Lists and Priority Queues?
- Next by thread: Re: Skip Lists and Priority Queues?
- Index(es):
Relevant Pages
|