Assume there is a stack implemented using doubly linked list. And you know the Head node
pointer only.
a. Write push( dll, value) and int pop(dll) for this stack.
b. Write the output for each print statement (show the status of the stack) in the
main function below. Each line will contain status of the stack after each printL()
called.
Struct Node
{
int data;
Node* prev;
Node* next;
}
void push (/* you write your argument list */)
{
//Your program here
}
int pop (/* you write your argument list */)
{
//Your program here
}
int main()
{
Node*Head =NULL;
push(Head, 10);
push(Head, 110);
push(Head, 120);
push(Head, 199);
printL(Head); // you don’t need to implement printL
pop(Head);
pop(Head);
printL(Head);
push(Head, 12);
push(Head, 10);
pop(Head);
printL(Head);
}
Attachments:
Answers
Answered by
0
Answer:
ghhghhhhhfghhgggvhbhggj
Answered by
0
Answer:
I cant understand question.. Sry
Explanation:
Plzzzz Mark me as brainlist
Similar questions