SIMPLE REPRESENTATION OF A STACK
Given a stack S = (a[1], a[2],… a[n]) then we say that a1 is the bottom most element and element a[i]) is on top of element a[i – 1], 1< i ≤ n.
Implementation of stack:
(i) Array (static memory)
(ii) Linked list (dynamic memory).
ADT OF STACK
A stack S is an abstract data type (ADT) supporting the following three methods:
- Push(n): Inserts the item n at the top of stack. An error occurs if the stack is full.
- Pop( ): Removes the top element from the stack and returns that top element. An error occurs if the
stack is empty. - Peek( ): Returns the top element and an error occurs if the stack is empty.
OPERATIONS OF STACK
- PUSH operations
- POP operations
- PEEK operations
Dear Aspirants,
Your preparation for GATE, ESE, PSUs, and AE/JE is now smarter than ever — thanks to the MADE EASY YouTube channel.
This is not just a channel, but a complete strategy for success, where you get toppers strategies, PYQ–GTQ discussions, current affairs updates, and important job-related information, all delivered by the country’s best teachers and industry experts.
If you also want to stay one step ahead in the race to success, subscribe to MADE EASY on YouTube and stay connected with us on social media.
MADE EASY — where preparation happens with confidence.

MADE EASY is a well-organized institute, complete in all aspects, and provides quality guidance for both written and personality tests. MADE EASY has produced top-ranked students in ESE, GATE, and various public sector exams. The publishing team regularly writes exam-related blogs based on conversations with the faculty, helping students prepare effectively for their exams.
