Implementation of stack using array

Array
Stack
  • >> INIT_STACK (STACK, TOP)

    Algorithm to initialize a stack using array.
    TOP points to the top-most element of stack.


    1) TOP: = 0; 2) Exit
  • Drag me Anywhere

    Enter the values to perform Stack Operations

    Events

    Item
    "Pushed"
    is

    Item
    "Popped"
    is

    Stack
    "Pointer"
    is

    -1

    "Top"
    Element
    is