Question

    Which data structure uses the LIFO

    principle?
    A Queue Correct Answer Incorrect Answer
    B Stack Correct Answer Incorrect Answer
    C Linked List Correct Answer Incorrect Answer
    D Tree Correct Answer Incorrect Answer

    Solution

    "A Stack follows the Last-In-First-Out (LIFO) principle, meaning the last element added is the first to be removed. Examples include the call stack in programming. Common stack operations: push, pop. Stacks are used in undo operations. Can be implemented using arrays or linked lists."

    Practice Next

    Relevant for Exams: