Data Structure and Algorithm | Reference Notes

Stack Stack is a data structure in which last element inserted is the first to come out, Last In First Out (LIFO). Static Stack is implemented with array, and pointer (end) for inserting and removing element from the array. Stack has push, pop, display methods. class stk{ int data[]; int top; public stk(){ data = new int[10]; top = […]