Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show answers with explination and please notice that Algorithms must be written using pseudo code emphasizing the notation (meta-language) Data structure 20)ln class we

image text in transcribed

please show answers with explination and please notice that Algorithms must be written using pseudo code emphasizing the notation (meta-language)

Data structure

20)ln class we implemented a link allocated queue subject to the boundary conditions E= and setting R := Location(F) when empty. Write an algorithm to remove the last item in the queue effectively creating an input restricted deque (can remove from both ends but only insert on 1 end the rear) Observe all boundary conditions including underflow and overflow. queue/deque represents a customer list. The sample Info List Partial Customer! F | Joe | Sam | Mary | | R If (F2 ) Underflow locate node preceding last node While (punk+ ) loop End loop Else Y pt2. info pt2 => avail (delete) if (pt= E)-deleting only node in list Else -more than one item in list End if End if 24)Assume a bounded linearly allocated circular deque of M+1 items as described below Bounded Linearly Allocated Circular Queue Joe Sam Mary The above diagram reflects the contents after inserting three items. We assume the boundary condition that F -R -0 initially. Traditionally we have considered the queue as empty anytime F R. Write an algorithm to remove the item at the rear of the deque (pointed to by R). Your algorithm must detect and report underflow as efficiently as possible 20)ln class we implemented a link allocated queue subject to the boundary conditions E= and setting R := Location(F) when empty. Write an algorithm to remove the last item in the queue effectively creating an input restricted deque (can remove from both ends but only insert on 1 end the rear) Observe all boundary conditions including underflow and overflow. queue/deque represents a customer list. The sample Info List Partial Customer! F | Joe | Sam | Mary | | R If (F2 ) Underflow locate node preceding last node While (punk+ ) loop End loop Else Y pt2. info pt2 => avail (delete) if (pt= E)-deleting only node in list Else -more than one item in list End if End if 24)Assume a bounded linearly allocated circular deque of M+1 items as described below Bounded Linearly Allocated Circular Queue Joe Sam Mary The above diagram reflects the contents after inserting three items. We assume the boundary condition that F -R -0 initially. Traditionally we have considered the queue as empty anytime F R. Write an algorithm to remove the item at the rear of the deque (pointed to by R). Your algorithm must detect and report underflow as efficiently as possible

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Does memory consist of separate stores?

Answered: 1 week ago

Question

2. What is the business value of security and control?

Answered: 1 week ago