Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EXERCISE 3: QUEUE IMPLEMENTATION LINEAR LINKED LIST AND CIRCULAR LINKED LIST 1. Answer the following questions which implies to queue implementation link list. a. Give

image text in transcribedimage text in transcribedimage text in transcribed

EXERCISE 3: QUEUE IMPLEMENTATION LINEAR LINKED LIST AND CIRCULAR LINKED LIST 1. Answer the following questions which implies to queue implementation link list. a. Give two types of linked implementation of queues. b. Explain why the linked-list based queue in (a) does not need isFull() function to check whether the queue is full or not. c. Give one advantage of a queue that implements circular linked list. d. A queue linkedQueue Type is a linear linked implementation of queue, has two pointers named queue Front and queueRear. What are these two pointers pointing to? e. When queue linkedQueueType is first initialized invoked by the constructor linkedQueueType () ), what are the value of pointer queueFront and queueRear pointing to? f. Draw the diagram that represents the following data structure. i. Queue implementation linear link list. ii. Queue implementation circular link list. 3. Figure 2.0 is a queue myQueue that implements circular array to store char value. Suppose you are given a variable front that handle deletion from a queue, a variable back that handle insertion into a queue, and a variable count to keep 250 MODULE 9: QUEUE track of how many elements in the queue. Variables, front, back and count already has value 4,5 and 2 respectively. [0] [1] [2] [3] [4] [5] [6] item U M front = 4 back = 5 count = 2 Figure 2.0 1 2 3 myQueue.enQueue ('A'); my Queue. enQueue ('R'); myQueue. de Queue (item); a. Draw the queue myQueue and update the value of front, back and count after each statement in line 1 to line 3 of the above has been executed

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions