### 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]

### STACK

Stack What is stack? Stack is an Linear data structure which are in commonly used to organize the data. it is named stack as it behaves like a real-world stack, …

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

Algorithm: 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]

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

Algorithm: 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]

### Write an algorithm “Insert At Mid Point” in doubly link list.

Algorithm: Insert (node head, value) 1. [Start] 2. [Check condition] If head=null OR head->next=null then Show “cannot be inserted.” Else Node ptr=head 2.1 [Repeat loop] While ptr<>null Count++ Ptr=ptr->next [End …