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
Poor Richard's cache as explained in Conference Topic 2. Suppose that a 7th word (gggg gggg) from main memory location 011110 is read and stored in cache. a) Determine the cach

What is CLR?  CLR(Common Language Runtime) is the major resource of .Net Framework. It is collection of services like garbage collector, exception handler, jit compilers etc. w

Telex is a (A)  Telephone Service between various subscribers (B)  Tele printer Service between various subscribers (C)  Television Service between various subscri

Q. Explain about Two-pass assembler? Assemblers usually make two or more passes through a source program in order to resolve forward references in a program. A forward referenc

A different smooth structure on R: Show that (U, f) given by U = R, f : x -> x3, is a local chart of the topological manifold M = R which is not a member of the standard smoo

What is logical address space and physical address space? The set of all logical addresses generated by a program is known as a logical address space; the set of all physical a

Can we call reports and transactions from interactive reporting lists? Yes.  It also permits you to call transactions or other reports from lists.  These programs then use val

An HTML tag is a syntactical construct in the HTML language that abbreviates particular instructions to be implemented when the HTML script is loaded into a Web browser. It is like

What is recursion? Recursion: - Recursion is described as a technique of defining a set or a process in terms of itself.

Define about the Objects The object notation is the same in basic form as that for a class. There are three differences among the notations, these are given below: With