+1 vote
in Data Structures & Algorithms I by (110k points)
In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue?

(a) Only front pointer

(b) Only rear pointer

(c) Both front and rear pointer

(d) No pointer will be changed

This interesting question is from Queue using Linked List topic in portion Abstract Data Types of Data Structures & Algorithms I

I have been asked this question in semester exam.

1 Answer

+1 vote
by (412k points)
selected by
 
Best answer
Correct answer is (b) Only rear pointer

Easiest explanation - Since queue follows FIFO so new element inserted at last.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...