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.
Loading...
Related Quiz
- What is the time complexity of a linear search algorithm in the worst case?
- Which Seaborn function would you use to visualize a bivariate distribution of two variables?
- How would you chain multiple decorators on a single function?
- The ____ method in Python web frameworks is used to handle HTTP POST requests from the client.
- In Django, the ____ file is used to store the settings of a project, such as database configurations.