Implement a priority queue, Computer Engineering

1. Insert the following characters with their respective priorities (shown as ordered pairs) into an empty treap:

(K, 17), (F, 22), (P, 29), (M, 10), (N, 15), (L, 26), (G, 13), (X, 20), (A, 44), (P, 19), (Q, 30).

Show the result after each insertion.
 
2. Given a Skiplist with probability p and maximum node size M that contains N nodes, show the expected distribution of node sizes (how many nodes of each size).
 
3. How would choosing a large value (close to 1) of p or a small value (close to 0) affect the performance of a skiplist? Justify your answer.
 
4. Insert the values 89, 19, 50, 59, 76 and 26 into an empty hash table of size 11 that uses f( k ) = k mod 11 for its hash function and linear probing using f( i ) = i for collision resolution. 

5. Is a hash table a good choice to implement a priority queue? Justify your answer.

Posted Date: 2/14/2013 1:58:58 AM | Location : United States







Related Discussions:- Implement a priority queue, Assignment Help, Ask Question on Implement a priority queue, Get Answer, Expert's Help, Implement a priority queue Discussions

Write discussion on Implement a priority queue
Your posts are moderated
Related Questions
Q. Explain about disk caching scheme? The disk caching scheme can be used to speed up performance of disk drive system. A set (cache) of buffers is assigned to hold some disk b

Difference between Vertical and Horizontal Organization Vertical Organizations  It is a usual approach which is typified by a functional approach to work in which departme

Representation scheme in artificial intelligence: It is not hard to see why logic has been popular representation scheme in AI: In this way, It is easy to represent knowl

write a code to decode the string"i need 1000 bucks"

Q. why we need Web Browser? A Web browser is software program which allows you to easily display Web pages and navigate the Web. The first graphical browser, Mosaic, was develo

Q. FORALL Statement in fortran? The FORALL statement permits for more common assignments to sections of an array. A FORALL statement has general form.   FORALL ( triplet, ..

Normal 0 false false false EN-US X-NONE X-NONE Figure: SIMD Organisation

Define Hit ratio. The performance of cache memory is frequently measured in terms of quantity called hit ratio. Hit-Find a word in cache. Miss-Word is not found in cache.

An amplifier has an input resistance of 600 ohms and a resistive load of 75 ohms. When it has an rms input voltage of 100 mV, the rms output current is 20mA. Find the gain in dB.

Q. What basic concepts of evolution are used by the genetic algorithm? ANSWER: The three concepts are selection, crossover and mutation. Selection is the feature of a genetic a