A stack is a linear data structure that follows the principle of Last In First Out (LIFO) . This means that the element that is inserted last in the stack is the first one to be removed from it.

We add new elements or remove existing elements from the same end, commonly referred to as the top of the stack.

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.