### Write an algorithm of peek(print) operation using array in stack

Algorithm: peek(stack,Top) 1-[start] 2- [Check condition] if (Top=-1) show”stack is empty” Return Else Show stack[Top] 3-[Return]

Read More
Skip to content
# Stack

### Write an algorithm of peek(print) operation using array in stack

### Write an algorithm of Deletion(Pop) using array in Stack

### Write an algorithm of insertion (push) using array in stack

We Give You Every Kind Of Information

Algorithm: peek(stack,Top) 1-[start] 2- [Check condition] if (Top=-1) show”stack is empty” Return Else Show stack[Top] 3-[Return]

Read MoreAlgorithm: Push(Stack,N,Top) (1) [Start] (2) [Check for Empty] If Top= -1 Show “Stack is Empty” Return Else Delete Stack[Top] Top= Top-1 [End Of If Else step 2] (3) [Return]

Read MoreAlgorithm: Push(Stack,N,Top,value) (1)[Start] (2)[Check for Full] If Top= N-1 Show “Stack is Full” Return Else Top=Top+1 [End Of If Else step 2] (3) Stack[Top]= Value (4) [Return]

Read More