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
Explain the types of hardware used in supermarkets These use many types of specialist I/O hardware. For instance: -  Bar code readers/scanners (to read product details and e

what is ecs?

The Internet has emerged as a major worldwide distribution channel for goods, managerial, services, and professional jobs. It has impacted market economics and industry structure,

Q. Systems Analyst in Traditional Business? In the traditional business information services are centralized for entire organization or for a specific location. In this organiz

Any system able of run Gnome 2, KDE 3.2, Windows 2000, Mac OS X and later versions should be capable to run GIMP. GIMP's biggest appetite is for memory and how much you will requir

Advantages of random scan display Early computer displays: basically an oscilloscope. Control X, Y with vertical/horizontal plate voltage. Often used intensity as

Give brief explanation about the keyboards Keyboards are generally not offered as the number of options is limited and owners of the system do not want customers keying in info

Rational Robot is a whole set of components for automating the testing of Microsoft Windows client/server and Internet applications. The major component of Robot lets you start

What is library? A library is a collection of classes that are useful in most of the contexts. Classes must have accurate and thorough explanations to help users.

On the Moodle site just below the assignment you will find data from a slow sine sweep test conducted on a car on a "four-post" road simulator for the frequency range 0 to 20 Hz in