MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A priority queue can efficiently implemented using which of the following data structures? Assume that the number of insert and peek (operation to see the current highest priority item) and extraction (remove the highest priority item) operations are almost same.
A
Array
B
Linked List
C
Heap Data Structure like Binary Heap, Fibonacci Heap
D
None of the above
Explanation: 

Detailed explanation-1: -A priority queue can be implemented using on array, linked list, a binary search tree or a heap. The most efficient implementation being the heap.

Detailed explanation-2: -Priority queue can be implemented using an array, a linked list, a heap data structure, or a binary search tree. Among these data structures, heap data structure provides an efficient implementation of priority queues.

Detailed explanation-3: -The binary heap is a data structure that can efficiently support the basic priority-queue operations.

Detailed explanation-4: -Priority queue can be implemented using an array, a linked list, a heap data structure. Among these data structures, heap data structure provides an efficient implementation of priority queues.

Detailed explanation-5: -Priority queue in a data structure is an extension of a linear queue that possesses the following properties: Every element has a certain priority assigned to it. Every element of this queue must be comparable. It will delete the element with higher priority before the element with lower priority.

There is 1 question to complete.