Which of the following principle is used if two elements in the priority queue…

Which of the following principle is used if two elements in the priority queue have the same priority?

Answer: B. FIFOAnswer: b Explanation: The answer is b, i.e., FIFO. In a priority queue, if two or more elements have the same priority then they are arranged based on the…

  1. A.

    LIFO

  2. B.

    FIFO

  3. C.

    Linear tree

  4. D.

    None of the above

Attempted by 441 students.

Show answer & explanation

Correct answer: B

Answer: b

Explanation: The answer is b, i.e., FIFO. In a priority queue, if two or more elements have the same priority then they are arranged based on the FIFO principle.

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…