You are here:   HomeData StructuresSearching And SortingWhat is Stack
by Dinesh Thakur Category: Searching And Sorting

An important subclass of lists permits the insertion and deletion of an element to occur only at one end. A linear list of this type is known as ‘stack’.

The insertion is referred to as ‘push’. The deletion is referred to as ‘pop’. The two pointers used for accessing is top & bottom pointer.


PUSH – Storing the element into the stack.

Check top<= allowed size if yes increment the top position and store the value in the top position.

POP -  Deleting the element from the stack. If top<= we can not delete.

Otherwise decrement the top by one and return the top+1 element.


Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.

What's New and Popular

Search Content

Advance Courses

Basic Courses

Advertise with Us