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
Question 1 What are the drivers behind the convergence between voice and data networks? Explain them briefly Question 2 Explain the need and functioning of Private ST Netw

We download data which arrives to me in a column. I need to use it in a complex sheet that requires data in a row. How can we convert the column data into row data?   Ans) H

i want to know complete detail of 8086 microprocessor such as memory segment ,interface with ram rom ect

Question : a) Describe the following modes of wave propagation: - Line of sight - Ground waves - Skywaves b) Why can waves with a very low frequency be used for submar

Circuits can be designed to implement a specifictaske.g. a simple circuit could compare two inputvoltages and give a high output if they matched anda low output if they did not mat

Q. What do you mean by Manual Assembly? It was an old method which required the programmer to translate every opcode in its numerical machine language representation by search

Data buffering is quite helpful for purpose of smoothing out gaps in speed of processor and I/O devices. Data buffers are registers that hold I/O information temporarily. I/O is pe

How is EISA bus different from ISA bus? Extended Industry Standard Architecture (EISA) is a 32 bit modification to ISA bus. As computers became larger and had wider data buses,

The Credit Line The Credit Line is a set of informational facts usually found below or beside a picture of a work of art. Should the picture appear in a book, magazine, poster,

Processors can broadly be seperated into the categories of: CISC, RISC, hybrid, and special purpose.