engineering recuitment NIELIT Scientific Assistant Mock Test 2025 Programming and Data Structure Stack
Consider the following statements about stacks and choose the option that correctly identifies their validity.
- A stack allows access to the middle element in constant time.
- The operation to add an element to the stack is commonly referred to as "push."
- "Pop" is the operation that removes the top element from the stack without violating the LIFO (Last In, First Out) principle.
1
Only 1 and 2 are correct.
2
Only 2 and 3 are correct.
3
All statements are correct.
4
Only 1 and 3 are correct.