Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

which of the following algorithms is correct for INSERTING AN ELEMENT AT THE RIGHT SIDE OF THE DE-QUEUE Select one: a. 1. Input the DATA

which of the following algorithms is correct for INSERTING AN ELEMENT AT THE RIGHT SIDE OF THE DE-QUEUE

Select one:

a. 1. Input the DATA to be inserted 2. If ((left == 0 && right == MAX1) || (left == right + 1)) (a) Display Queue Overflow (b) Exit 3. If (left == 1) (a) left = 0 (b) right = 0 4. Else (a) if (right == 0) (i) left = MAX 1 (b) else (i) right = right+1 5. Q[right] = DATA 6. Exit

b. 1. Input the DATA to be inserted 2. If ((left == 0 && right == MAX1) ) (a) Display Queue Overflow (b) Exit 3. If (left == 1) (a) left = 0 (b) right = 0 4. Else (a) if (right == MAX 1) (i) left = 0 (b) else (i) right = right+1 5. Q[right] = DATA 6. Exit

c. 1. Input the DATA to be inserted 2. If ((left == 0 && right == MAX1) || (left == right + 1)) (a) Display Queue Overflow (b) Exit 3. If (left == 1) (a) left = 0 (b) right = 0 4. Else (a) if (right == MAX 1) (i) left = 0 (b) else (i) right = right+1 5. Q[right] = DATA 6. Exit

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago