Implementations of a priority queue

Assignment Help Business Management
Reference no: EM131310353

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

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.

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 Dequeueoperations. 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: EM131310353

Questions Cloud

Total number of employees assigned to a specific department : A public function called GET_DEPARTMENT_COUNT to retrieve the total number of employees assigned to a specific department. The function should accept the department ID as a parameter and return the number of employees in that department. Add error..
Describe the logistics value proposition : Describe the fundamental similarities and differences between procurement, manufacturing support, and market distribution performance cycles as they relate to logistical control.
Write java program that generates three-digit random number : Write a Java application that generates a 3-digit random number 100 times. Display the output for each of the generated numbers and the sum of all 100 numbers.
How does the quest for quality affect logistical operations : How does the "quest for quality" affect logistical operations? Does the concept of total quality have relevancy when applied to logistics?
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 key value. The elements have the following declarations:
Prove that des cipher satisfies the complementation property : Let k be the encipherment key for a Caesar cipher. The decipherment key differs; it is 26 - k. One of the characteristics of a public key system is that the encipherment and decipherment keys are different. Why then is the Caesar cipher a classica..
Describe bottoms adventure with titania : Describe Walter Lee's conflict and general state of mind throughout most of the play.Describe the value system that prevailed in Helmer's household. What demand did Nora ultimately make?
How performance cycle variance can be controlled : Discuss uncertainty as it relates to the overall logistical performance cycle. Discuss and illustrate how performance cycle variance can be controlled.
Create a class named order that performs order processing : Create a class named Order that performs order processing of a single item. Create a subclass named ShippedOrder that overrides computePrice() by adding a shipping and handling charge of $4.00.

Reviews

Write a Review

 

Business Management Questions & Answers

  Paid by their employer to carry out a job

A major strategy for helping others grow and develop is to be a nurturing, positive person. Discuss how a nurturing person promotes the growth of others.

  Recommend an eoq for macho heavy beer

Recommend an EOQ for Macho Heavy Beer. - What is the recommended safety stock if Macho decides on an 85 percent service level?

  Types of conflict in the workplace

Let's take a look at some other types of conflict in the workplace. Workplace violence by some is considered a conflict and others classify it as workplace violence.

  A brief overview of conflict resolution and

a brief overview of conflict resolution and initiativesplease provide a brief overview of these topics1. teaching

  Define acute and chronic stress

1. Define acute and chronic stress. Provide examples. 2. What region of the brain detects stress and interprets the stimulus as dangerous? What is its function, and where does it relay the signal that conveys the danger? What format is the signal ..

  Downsizing in canada factors amp implicationsin 1982 the

downsizing in canada factors amp implicationsin 1982 the construction materials industry in canada was in shambles.

  Describe the papers scope and outline the major sections

Describe the paper's scope and outline the major sections. Identify and explain the questions to be answered. Explain your research plan, including the methods of researching and organizing research.

  Important information about team workit is my belief that

important information about team workit is my belief that when teams are first formulated every individual approaches a

  How does mission relate to type of products company sells

How does the mission relate to the type of products the company sells? Did anything surprise you about the mission? Why or why not?

  Strategies for not for profit organization

What are some strategies for not for profit organization? for instance, organization that helps refugees and newcomers that are new to the country?

  Workplace security - explored through research

Workplace Security - Explored through research - Show the theoretical foundation for security and the reasons for the tremendous growth in security services.

  Discuss the difference among value-based pricing

Define also discuss the difference among value-based pricing also cost-based pricing. Illustrate what are strengths also weaknesses of each method

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