Reference no: EM13996596
Data StructuresAssignment: [Individual Hand-In] Queue analysis
Organising data so that it can be efficiently retrieved is one of the cornerstones of software engineering. Cumbersome data structures lead to sluggish software performance, potential errors, and ultimately, end-user dissatisfaction. In order to become adept at data structuring, it is prudent to continually work with data structure components. The most common of these are queues.
Unlike the Scratch Assignments of recent Weeks, this Hand-In Assignment will challenge your ability to analyse a queue based on limited information. Use the following information to complete this Assignment:
A queue has certain characteristics as listed below:
Head - The next item to exit the queue is always the head.
Tail - The next item to enter the queue will always enter at the tail.
Length of the queue - The number of items in the queue (between the head and tail).
Capacity of the queue - The maximum number of items that the queue can hold.
Position of each item - A queue can have any number of items between the head and tail, but each item has a position within the overall order.
A queue can be implemented using a homogenous array and a tail counter. The head of the array is always the first element of the array. Every time an item exits the queue, the other items are moved up. New items are always added to the end of the array. The capacity of the queue is equal to the capacity of the array. The tail counter specifies the location of the tail in the array.
To prepare for this Assignment:
Review your Weekly Learning Resources with a focus on data structures and queues.
Critically analyse the given queue information for efficiency issues.
Reflect on common conditions that tend to deteriorate efficiency.
You may use Scratch, or any other programming tool you prefer, to help you solve the problem.
To complete this Assignment:
Submit an answer to the posed problem and address the following:
Analyse the given queue implementation for the purposes of efficiency.
Identify the conditions under which the implementation tends to deteriorate in efficiency.
Recommend improvements to the given queue and/or its implementation.
What is the amplitude of oscillation of the mass
: A student is studying a 100.0g mass oscillating on a horizontal spring of spring constant k=18N/m. At t=0, the object was at rest and its position was x= 2.55cm from its equilibrium position. What is the amplitude of oscillation of the mass?
|
What are the magnitudes of the momenta of the photons
: Explain why the electron and positron cannot annihilate to become a single photon. What are the magnitudes of the momenta of the photons?
|
Determine the magnitude of the balloon initial velocity
: The target is located a horizontal distance d = 7.5 m from the student's feet. Assume that the balloon moves without air resistance. Use a Cartesian coordinate system with the origin at the balloon's initial position. What is the position vector,..
|
Is commodities liable to e-products under the sales
: Is Commodities liable to E-Products under the sales contract for the computers, printers and scanners? Why or why not? Is Brenda personally liable to E-Products to pay for the computers, printers and scanners? Why or why not
|
Implementation for the purposes of efficiency
: A queue can be implemented using a homogenous array and a tail counter. The head of the array is always the first element of the array. Every time an item exits the queue, the other items are moved up. New items are always added to the end of the ..
|
Find an equation for the magnitude of the net magnetic force
: Find an equation for the magnitude of the net magnetic force on the loop in terms of the constants Bo, I, and L. Find an equation for the direction of the net magnetic force on the loop in terms of the constants Bo, I, and L.
|
Beneficiaries of american democracies
: In this book the history of the United States is seen from the viewpoint of people who were not necessarily beneficiaries of American democracies
|
What do you know about slavery in the antebellum us
: What do you know about slavery in the antebellum United States, and how does it compare to slavery as discussed in "Oroonoko?" Use examples from the text to support your comparisons
|
What ethical responsibilities do you have
: Are your actions due to your free will or are they predetermined? Lay out your arguments for your position. Give your conclusion to the first question. What ethical responsibilities do you have
|