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
What is MASK OPERATION The mask operation is similar to selective-clear operation except which the bits of Aare cleared only where there are corresponding 0's in register B. th

While using FTP what is wildcard expansion in file names? To make this easy for users to identify a set of file names, FTP permits a remote computer system to perform usual fil


Graphics adapters: Video card converts digital output from computer into an analog video signal and transmits the signal through a cable to monitor also known as a graphics ca

what are the domains of artificial intelligence

what is meant by scan conversion?

Find out useless nonterminal symbols use c program.

State the scope of security policy The scope of security policy depends on aspects such as the size of the Intranet site, type of information hosted on it, and the number of u

A computer manipulates data consistent with instructions of a stored program. Stored program means that the data and program are stored in same memory unit. Central processing unit

Q. Describe Independent Loops in fortran? HPF offers extra opportunities for parallel execution by employing the INDEPENDENT directive to declare the iterations of a do-loop is