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
DefectTracker from Pragmatic Software - Defect Tracker is a fully web-based defect tracking and hold up ticket system that manages issues and bugs, customer needs, test cases, a

Q. What are intelligent agents? What tasks will they perform? ANSWER: Intelligent agents are software that helps you, or operate on your behalf, in performing repetitive comput

How numbering plan is achieved in modern telephony? Give the structure with example. The objective of numbering plan is to uniquely identify every subscriber connected to a tel

How can we change almost any algorithm to have a good best case running time? Check whether the input constitutes an input at the very starting Or else run the original algo

Explain about the Arithmetic Shift An arithmetic shift micro operation shifts the signed binary number to left or right. The effect of the arithmetic shift left operation is

Question 1 What is modulation? Explain why is modulation required? 2 Briefly explain about ASK, FSK and PSK 3 Explain about the Nyquist Bandwidth and Nyquist Theorem 4

Microsoft Visual basic has its host of problems one such being macros, Macros can be formed which can make havoc for a programmer with good intentions. Also the security issue rest

Bus Master: In  computer system,  bus  mastering  is  a attribute  supported  by  various  bus  architectures  that  enables  a  device linked to the bus to initiate transacti

what is semi conductor

The constructed datatype of C is known as Structure is a constructed datatype of C.