Skip to main content

Posts

Showing posts from September, 2017

Stacks & its Applications

Hi, 👋 everyone, Here is a new important section for the programmers. Data structures. As the first step I would like to discuss about the STACKS. Hope you have heard about stack. When we talk about the stacks the first thing that comes to our mind is, Isn’t it??? Yes! Stack is a kind of data structure which has only one opened end. So, you have to use this opened end when you insert or delete element. That means only the top element can accessible when you are using a stack.   Some examples for stack, Also we can say stack uses LIFO strategy. That means Last In First Out… Here is the list of operations we can done in stack. push(x)      – push/insert an element x to the stack pop()         – pop/delete/remove the top element from the stack top()           – Returns the top most element in the stack. But it does not allow to remove it. isEmpty ()  – Check whether the stack is empty or not isFull()        – Check whether the stack is full or