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

  Use jsp to prepare an amortization table for a loan

Use JSP to prepare an amortization table for a loan

  Give promising technology for the effective automation

Web services are emerging as a promising technology for the effective automation of inter-organizational interactions. How do you see you company being involved in Web Services in the future.

  Design formulas or use the autosum function

You do not require to put in personal information or actual values if you do not wish, but you must include some data for each of the various categories and income and expense line items.

  Write the same program using a for-loop

Write the same program using a for-loop - write the same program that will display only the even numbers and odd numbers from 1 to N.

  When programmer intentionally creates endless loop

When programmer intentionally creates an endless loop, how would he end the loop.

  Calculate the random access memory

Calculate the random access memory (RAM) in megabytes necessary to store a multidimensional array that is 20 × 40 × 120.

  Explain the features and characteristics of atm networks

explain the features and characteristics of ATM networks, as well as their benefits and limitations.

  How to convert the ff phrase into programming notation

how to Convert the ff phrase into programming notation

  Create a 3d graphics scene using opengl

Your task is to create a 3D graphics scene using OpenGL matching the theme described above. Your creation will include a path following a non-linear path on which the game or simulation will occur. There will be a series of camera views.

  Verify the floppy image with md-5

Using the image in Course Content called Assignment2.001, and using any of the methods that you have seen for doing an MD-5 hash (FTK, PRODISCOVER - THEY CAN BE DOWNLOADED ONLINE), verify the floppy image with MD-5.

  Create a crontab file that will regularly perform backups

Create a crontab file that will regularly perform the following backups.

  What the command does, how it might be used

What the command does, how it might be used.

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