Define stack.
Answer:
A stack is a data structure in which elements are arranged in a linear order.
In a stack, insertion and deletion takes place at one end i.e., the top of the stack.
Additional points:
Inserting into a stack is called a PUSH operation and deleting from a stack is called a POP operation.
A stack follows the LIFO principle i.e., an element which is inserted last will be the first one to be taken out.
Made by
Davneet Singh
Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.
Many students prefer Teachoo Black for a smooth, ad-free learning experience.
It looks like you're using AdBlock
Don't be a miser! Join Teachoo Black at ₹19 only to view the ad-free version of Teachoo.
Please login to view more pages. It's free :)
Teachoo gives you a better experience when you're logged in. Please login :)