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
Some of the fundamental considerations for instruction set design includes selection of:  A set of data-types (For example: integers, long integers, doubles, character strin

Building on their knowledge of research methods and their interest in a particular aspect of information technology this assessment enables students to put this knowledge into prac

Explain Priority encoder with an example. Ans. Priority encoder- Basically an encoder is a combinational circuit which performs the inverse operation of a decoder. The inp

What are Sewing Kits? Sewing Kits are modules which contain a not used mix of gates, any other cells or flip-flops considered potentially helpful for an unforeseen metal fix. W

A certain amount of side tone is essential in telephone communication. Ans: It is true that a specific amount of side tone is necessary in telephone communication.

E Brokerage facilitates search & retrieval of Information The success factor of a brokerage is its ability to retain existing clients and to enhance their satisfaction by effec

Assignment 3: Naïve Bayes algorithm for text classification. First part: In this assignment, we will redo the task of classifying documents (assignment 2) using the same R

It is recommended that you capture your assignment as a Hierarchical Design in Multisim. Look at the Help topic Working with Larger Designs. Design and thoroughly test each module

Explain the term - Instruction execution We  know  that  the  fundamental  function  performed  by  a  computer  is  the  execution  of  program. The program that is to be exec

Q.What is Canonical and Standard Forms? An algebraic expression can express in two forms: i) Sum of Products   (SOP) for example (A . B¯) + (A¯ . B¯)            ii) Produ