Stack is an abstract data-structure. This data-structure allows user to access the contents in Last In First Out order. This means, the latest element which was put in the data-structure, will be the first one to be removed on remove operation. You can watch my video, where I code this implementation. The operation, where we […]
Stack Implementation using C language
You can watch me live code the Stack Datastructure on youtube. You can get the entire source code from github I have put all the function declaration in a header file. struct Stack{ int top; int capacity; int *data; }; //Creation struct Stack *createStack(int *capacity); //Deletion int deleteStack(struct Stack *stack); //Status Checks int isStackFull(struct Stack *stack); […]
Convert infix equation to postfix in java
We know stack is first in and last out. The first to go inside a stack is going to be the last to come out of it. So, the aloglrithm to convert a infix to postfix is simple. We print all the operands. Operands are something which are not mathematical symbols and does not represent […]
Implementing Stack Datastructure using arrays.
Stack is a way of accessing data, Last In First Out (LIFO). It has nothing to do with underlying memory structure, whether it is an array or a linked list or a tree or whatever. If you are accessing the data in LIFO fashion, then it is a stack. Stack is an abstraction, it is a concept […]