Which data structure is commonly used to implement a stack? 🔊
The data structure commonly used to implement a stack is either a Linked List or an Array. A stack follows the LIFO (Last In, First Out) principle, where the most recently added element is the first to be removed. In both implementations, operations such as push (adding elements) and pop (removing elements) can be performed efficiently, making stacks useful for various applications, including managing function calls in programming.
Equestions.com Team – Verified by subject-matter experts