Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

Data Structure QUESTIONS : PART 4

In linked list implementation of a queue, where does a new element be inserted?

At the head of link list

At the tail of the link list

At the centre position in the link list

None

SHOW ANSWER

In the array implementation of circular queue, which of the following operation take worst case linear time?

Insertion

Deletion

To empty a queue

None 

SHOW ANSWER

In linked list implementation of queue, if only front pointer is maintained, which of the following operation take worst case linear time?

Insertion

Deletion

To empty a queue

Both a) and c) 

SHOW ANSWER

If the MAX_SIZE is the size of the array used in the implementation of circular queue. How is rear manipulated while inserting an element in the queue?

rear=(rear%1)+MAX_SIZE

rear=rear%(MAX_SIZE+1)

rear=(rear+1)%MAX_SIZE

rear=rear+(1%MAX_SIZE)

SHOW ANSWER

If the MAX_SIZE is the size of the array used in the implementation of circular queue, array index start with 0, front point to the first element in the queue, and rear point to the last element in the queue. Which of the following condition specify that circular queue is FULL?

Front=rear= -1

Front=(rear+1)%MAX_SIZE

Rear=front+1

Rear=(front+1)%MAX_SIZE

SHOW ANSWER

A circular queue is implemented using an array of size 10. The array index starts with 0, front is 6, and rear is 9. The insertion of next element takes place at the array index.

0

7

9

10

SHOW ANSWER

If the MAX_SIZE is the size of the array used in the implementation of circular queue, array index start with 0, front point to the first element in the queue, and rear point to the last element in the queue. Which of the following condition specify that circular queue is EMPTY?

Front=rear=0

Front= rear=-1

Front=rear+1

Front=(rear+1)%MAX_SIZE

SHOW ANSWER

A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?

Queue

Circular queue

Dequeue

Priority queue

SHOW ANSWER

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?

Only front pointer

Only rear pointer

Both front and rear pointer

None of the front and rear pointer

SHOW ANSWER

A normal queue, if implemented using an array of size MAX_SIZE, gets full when

7Rear=MAX_SIZE-1

Front=(rear+1)mod MAX_SIZE

Front=rear+1

Rear=front

SHOW ANSWER

In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into EMPTY queue?

Only front pointer

Only rear pointer

Both front and rear pointer

None 

SHOW ANSWER

An array of size MAX_SIZE is used to implement a circular queue. Front, Rear, and count are tracked. Suppose front is 0 and rear is MAX_SIZE -1. How many elements are present in the queue?

Zero

One

MAX_SIZE-1

MAX_SIZE 

SHOW ANSWER

Suppose a circular queue of capacity (n-1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially REAR=FRONT=0. The conditions to detect queue full and queue is empty are?

Full: (REAR+1)mod n == FRONT

Empty: REAR==FRONT

Full: (REAR+1)mod n == FRONT

Empty: (FRONT+1) mod n == REAR

Full: REAR==FRONT

Empty: (REAR+1) mod n==FRONT

Full: (FRONT+1)mod n==REAR

Empty: REAR==FRONT

SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in