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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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