Which data structure follows the Last In, First Out (LIFO) principle?

A ) Queue

B ) Stack ✅

C ) Linked List

D ) Array


Explanation: A data structure that follows the LIFO principle means that the last element added to the structure will be the first one to be removed. Among the options provided, a "Stack" data structure follows this LIFO principle.