Create pseudo code for the given three queue methods

Assignment Help Data Structure & Algorithms
Reference no: EM131309391

The task this week is to complete the following 2 structures using a linked list:

Stack

Queue

Assume the occurrence of a linked list node is represented by the object "Node" and its "Data" and "NextRef" attributes.

Part 1: Assume a "Head" node exists with the NextRef attribute pointing to the first node in the stack or being null if the stack is empty. Create pseudo code for the following 3 stack methods, showing the logic tied to the inverted list. Include a summary of these actions.

push( item )
pop( )
display( )

Part 2: Assume "Front" and "Rear" nodes exist with the "NextRef" attributes pointing to the first and last nodes of the queue or being null if the queue is empty. Create pseudo code for the following 3 queue methods, showing the logic tied to the inverted list. Include a summary of these actions.

enqueue( item )

dequeue( )

display( )
Deliverables:
Pseudo code implemented for both the stack and queue methods
Documented pseudo code

Add the completed pseudo code and discussion to the Key Assignment template Section 1: Lists, Stacks, and Queues.

Reference no: EM131309391

Questions Cloud

What career paths would knowledge of excel worksheet benefit : What career paths would knowledge of Excel worksheets benefit an individual? Would knowledge of Excel be beneficial for you in your current or future career? How could you use Excel in your personal life?
Create the template with the date and addresses : Create the template with the date, addresses, salutation, and closing. Create your own letterhead or use a standard return address.
Find a current article on a labor dispute and summarize : Find a current article on a labor dispute, summarize and explain at least two pros and cons of both sides of the argument and; Find a current article on an antitrust or anticompetitive case. Discuss what type of regulation or law is being broken
Compute short-run supply curve for a single firm : a) Compute the short-run supply curve for a single firm, expressing q as a function the price P. b) Calculate the short-run industry supply curve.
Create pseudo code for the given three queue methods : Create pseudo code for the following 3 queue methods, showing the logic tied to the inverted list. Include a summary of these actions. enqueue( item ), dequeue( ) and display( ).
Why is time consistency important in economic models : Characterize Homo economicus. How does he differ from a regular human being?
Describe one example of anchoring : How does the endowment effect contradict aspects of conventional economic theory?
Upward-sloping aggregate supply curve : Why do higher prices in the goods and services market measured by the CPI lead to an upward-sloping aggregate supply curve?
Integrated component of windows : What difference does it make to the tying arrangement issues if internet explorer is a functionally integrated component of windows? what is it is more like a radio in an automobile than a steering post interlock device?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write an array-returning method that takes a two-d array

Write an array-returning method that takes a two-dimensional array of ints as a parameter and returns a two-dimensional array of chars, assigning a letter grade corresponding to the integer grade (A if 90 or above, ..., F if less than 60).

  Creating application - two dimensional array

Make an application that either sums or averages rows or columns of a 2-dimensional array depending on user choices.

  Describe types of information systems

Describe five types of information systems, and give an example of each and describe 3 common reasons for a systems request. Try and find one not listed in the text.

  Which includes and algorithm that takes an array

Write an application which includes and algorithm that takes an array, selects the high and low integer from the array of integers with each pass and builds a new array of integers by inserting the high and low selection with each pass. Your ..

  Compare the efficiency of selection sort and insertion sort

Compare the efficiency of Selection Sort and Insertion Sort. Draw charts to show how the running time grows as the size of the input data n is growing.

  Algorithm for checking whether a list of integers is sorted

Consider the obvious algorithm for checking whether a list of integers is sorted: start at the beginning of the list, and scan along until we first find a successive pair of elements that is out of order.

  Create a stock class to manage the stock activity

Create a Stock class to manage the stock activity. It should have private instance variables of company name. Create a get method to calculate and return the profit or loss. This would be calculated as Number of shares * (current price - purchase pri..

  Calculate the number of disk tracks traversed using the fcfs

Calculate the number of disk tracks traversed using the FCFS, SSTF, SCAN, and LOOK algorithms for the series of disk track service requests given below.

  A store makes four types of healthy cakes

A store makes four types of healthy cakes. To produce a type A cake requires 16 cups of Pour, 5 corn of sup:, 2 dozensof eggs. and 4 gram of vitamin c. 10 produce a typo !Italic tryouts 50 cups of flour. 6 cups of sugar, I dozens of eggs, and 2 gram ..

  Calculate the expected point for each possible strategy

What is the expected change in profit (could be a gain or a loss) if John's garage decides to hire another mechanic. [If the expected change in profit is negative, don't forget to include the negative sign in your answer.]

  Evaluate the reliability of the data mining algorithms

the development of complex algorithms that can mine mounds of data that have been collected from people and digital

  Write schedule produced by earliest deadline first algorithm

Given below are two sets of real-time, periodic tasks. For (a), will the schedule produced by Earliest Deadline First algorithm meet all the deadlines?

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