A ____ is a data structure that stores elements in a linear sequence but allows additions and removals only at the start.
- Array
- Linked List
- Queue
- Stack
A Stack is a data structure that follows the Last-In-First-Out (LIFO) principle, meaning the last element added is the first to be removed. It allows additions and removals at the start, making it suitable for managing function calls, undo functionality, and more.
Loading...
Related Quiz
- How would you override a method defined in a superclass in Python?
- You are developing a Python application where you need to store configuration settings. Which data type would you use to store key-value pairs of configuration settings?
- You are tasked with the development of a library where the user’s classes need to be altered after their definition, for additional functionality. How can metaclasses be employed to modify or augment the user-defined classes?
- What is the primary distinguishing feature of elements in a Python set?
- You have a large Python codebase, and you suspect that some parts of the code are suboptimal and slowing down the application. How would you identify and optimize the performance bottlenecks?