KnowledgeBoat Logo

Computer Science

A queue behaves on the basis of LIFO principle.

Python Queue

3 Likes

Answer

False

Reason — A stack behaves based on the Last-In-First-Out (LIFO) principle, meaning that the last element added to the stack is the first one to be removed, while a queue operates according to the First-In-First-Out (FIFO) principle, allowing insertions only at the rear end and deletions only at the front end.

Answered By

3 Likes


Related Questions