A binary tree with n nodes will have \( \left\lfloor \frac{n}{2} \right\rfloor \) leaf nodes
A directed acyclic graph is a tree
Hide Solution
Verified By Collegedunia
The Correct Option isA
Solution and Explanation
In a stack, the last element inserted is the first element to be removed (LIFO order). This matches the behavior of a priority queue where elements are processed in a specific order, depending on their priority. Hence, every stack can be considered a priority queue under specific conditions.
Thus, the correct answer is \( \text{Every stack is a priority queue} \).