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

Realized mean that the component has been painted on screen or that is prepared to be painted. Realization can take place by invoking any of these methods. setVisible(true), show()

consider the 8 bit floating point format including support for normalised nimbers and nonnumeric values.it included 3 bits for mantissa and 4 bitys for excess 7 exponent

What do you mean by complexity of an algorithm? The term complexity is used to define the performance of an algorithm. Typically performance is calculated in terms of time or s

Public Key Infrastructure solutions The use of public-key based security systems requires great attention and due care in design and management of security features. The secur

what is semi conductor

Characteristics of object oriented Modelling In object oriented modelling objects and their properties are explained. In any system, objects come into reality for playing some

You are to write a C program called big_mult.c that multiplies two unsigned 64-bit integers, x and y, read from the command line. The output is a pair of unsigned 64-bit integers r

Hyper-threading works by duplicating those parts of processor which store architectural state but not duplicating main execution resources. This permits a Hyper-threading equipped

The concept of Mouse was designed by Douglas C. Engelbart of Stanford Research institute and first Mouse was designed by Xerox corporation.  Mouse itself is a device that gives you