Implementations of a priority queue

Assignment Help Computer Engineering
Reference no: EM131145550

Your assignment is to write and compare two implementations of a priority queue whose highest priority element is the one with the smallest keyvalue. The elements have the following declarations:

1. The first implementation uses a minimum heap. You need to modify the heap operations to keep the minimum, rather than maximum, element in the root. The comparison function should compare key fields.

2. The second implementation uses a linear linked list, whose elements are ordered by key value.

Test Data

Create a data set that contains 50 items with priorities generated by a random-number generator.

Comparing the Implementations

To compare the operations, you must modify the Enqueue and Dequeue operations to count how many elements are accessed (compared or swapped, in the case of reheaping) during its execution.
Write a driver to Enqueue and Dequeue the 50 test items and print out the number of elements accessed for the Enqueue and Dequeue operations. Run your driver once with each implementation.
Deliverables
· A listing of specification and implementation files for both priority queue implementations
· A listing of your driver
· A listing of your test data
· A listing of the output from both runs
· A report comparing the number of elements accessed in executing each operation.

Reference no: EM131145550

Questions Cloud

Perform research to locate a data warehouse system : Perform research to locate a data warehouse system that has been applied to the health care,electronic commerce, or insurance industries and has been successfully developed and deployed to successfully produce actionable business intelligence
Calculate the weighted average cost of capital : Based on the information below, calculate the weighted average cost of capital. Great Corporation has the following capital situation. Debt: One thousand bonds were issued five years ago at a coupon rate of 11%.
How would you respond to her complaint : Assuming that you are Barbara's systems analyst friend, how would you respond to her complaint?
Should they even be laws in our society : Some laws arguably overlap into morality. For example, laws prohibiting gambling, underage drinking, and prostitution all arguably stem from moral issues. Are these laws effective? Should they even be laws in our society? Or should they just be mo..
Implementations of a priority queue : Your assignment is to write and compare two implementations of a priority queue whose highest priority element is the one with the smallest keyvalue.
Explain type of economy that exists in your selected country : Determine the type of economy that exists in your selected country - closed, mixed, or market. What is the difference between these types of economies and how might this affect your expansion?
Define and give an example of the curse of knowledge : Define and give an example of the "Curse of Knowledge" in communication? List, define and give example of 3 way to reach a conflict resolution
Find the average value above which only 15 percent would lie : The average and standard deviation of the amount of Goods and Services tax remitted by performance artists in a twelve month period were $5.042 thous and $1.551 thous respectively. If a sample of 110 artists was taken, find the average value above wh..
What is the nature of the process fluid : (a) What is the nature of the process fluid?(b) What are the objectives of the two sample points and in what way do the samples reaching the instruments differ?(c) Could the effectiveness of the second sample probe be improved and if so how?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explore paper on vmware security

Explore paper on VMware Security

  Accessing and reading a mouse

Accessing and reading a mouse

  Define coding of binary information and error detection

define Coding of Binary Information and Error Detection.

  Find how to perform system calls in each operating system

Write a C++ or Java program that reads from one file and writes to another find how to perform system calls in each operating system.

  List the two new or changed features in ipv6

List two new or changed features in IPv6. define how each one affects Internet Protocol including the affects to inter-networking issues. Be thorough in your discussion.

  Explain two types of health care information systems

Analyze the impact of the effect on organizational decision-making.Make recommendations for implementation and improvements.

  Build a simple airline ticket reservation program

modify a simple airline ticket reservation program in C++ that keeps track of individual passenger names, and their associated flight numbers, departure dates and times, and originating and destination cities.

  What types on a lan and the type of software licensing

Discuss role of each of the following server types on a LAN and the type of software licensing with which the software should be purchased.

  Creating a print chart or sample output

suppose you have a bank account that compounds interest on a yearly base. In other words, if you deposit 100 dollars for two years at 4 percent interest, at the end of one year you will have $104 .

  List the top advantages of migrating to ipv6

List the top advantages of migrating to IPv6

  Definition of method dashedline

Write down the definition of the method dashedLine , with one parameter, an int. If parameter is negative or zero, method does nothing.

  What are the expected completion time

What are the expected completion time and the critical path for the landscaping project and What are the earliest and latest start and finish times for activity C

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd