Quiz Champion

Which data structure does FILO apply to?

  • Queue
  • Stack
  • Heap
  • Tree
Explanation

FILO (First In Last Out) applies to the Stack data structure because in a stack, the last item inserted is the first one to be removed. It follows the LIFO principle, where elements are added and removed from the top of the stack. This is similar to a stack of books, where the last book placed on top is the first one to be taken off. The stack data structure keeps track of the order in which elements are added and ensures that the most recently added element is always accessible and the first to be removed.