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

  • Array
  • Linked List
  • Queue
  • Stack
A stack is a data structure that follows the Last In First Out (LIFO) principle. It means that the last element added to the stack will be the first one to be removed. Stacks are commonly used in programming for tasks like tracking function calls and managing memory.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *