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

  Produce a class diagram for denbys video hire system

casedenbys video hire are a chain of 10 stores in the coventry amp warwickshire area. they provide a dvd movies hire

  Select one of the social media tools noted above and

select one of the social media tools noted above and explain how this application can be used to collect data from

  Drawing the uml state diagram

In the chess game white and black make alternate moves. White takes first move. Both Black and White may finish the game: by winning, by giving up, by draw.

  Write down a perl program that given a dna string prints

write a perl program that given a dna string prints out the 20 characters upstream of the start codon atg. that is

  Difference in a single-cell and a multiple-cell wireless lan

Can someone help with the following questions I have done some research on the internet and found different meanings so I am looking for something different from the internet posting. I know what each of the following devices are however I am look..

  What are some drawbacks of databases

What are some drawbacks of databases.Can you mix summarized data with non summarized data.

  Why visual studio would be a better way to develop software

Visual Studio 2010 is an example of an IDE system. Explain why Visual Studio would be a better way to develop a software system than to just have a simple compiler and linker

  What type of auditing would be appropriate for a bank

Take your current information of Oracle Logs ect and project how a bank may make use of the integrity control mechanisms. This is more of a speculate than a cold hard fact questions.

  Suggest a fragmentation design of the account relation

Suggest a fragmentation design of the Account relation

  It will calculate the additional amount of sales that each

modifynbspthe week three javatm application using javatm netbeanstm ide to meet these additional and changed business

  Generating ten random permutations

Write down a program which generates ten random permutations of numbers 1 to 10. To produce a random permutation, you require filling a vector along with the numbers 1 to 10 so that no two entries of vector have the same contents.

  Project that is already over budget and past due

assume that you have been hired to "save" a project that is already over budget and past due. The project is still only half done. You have 20 programming teams working independently.

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