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 Microcomputers? Microcomputers: A microcomputer's CPU is a microprocessor. They are characteristically used as single usercomputer though present day microco

FACSIMILE : This is often known as 'fax' and it represents the interface between reprographic and computer technology. By using fax, the contents of a sheet of paper (text or illu

write a program insert and remove value in queue.

What is a Priority Interrupt? Ans: A priority interrupt is a type of interrupt that establishes a priority over the many sources to determine which condition is to be serviced

Discuss the advantages of Electronics Data Exchange (EDI). Advantages of EDI: Electronics Data Exchange's saves needless re-capture of data. It leads to faster transfer of d

All components of computer communicate with processor by the system bus. Which means I/O devices required to be attached to system bus. But I/O devices aren't connected directly to

Distinguish between combinational logic circuits and sequential logic circuits. Ans: Combinational logic circuits:- (i) Outputs only depend upon present state of the i

Structuring the Web site is first step towards building the corporate Web site. Structuring includes creating a folder that includes all our picture files, text files and database

It is a mixture of hardware and software to perform needed task

Define Process. Process: It is a program in execution; process execution should progress into sequential fashion. Process contains: program counter stack dat