urgent using c++ 1. Suppose you have available to you a header file 1istnode.h c
ID: 3903232 • Letter: U
Question
urgent using c++
1. Suppose you have available to you a header file 1istnode.h containing the description of nodes for a list (data & pointer to next data), and a header file list.h containing the functions: insertAtFront insertAtBack removeFromFront, removeFromBack. You are asked to create header files stack.h & queue.h (for stacks & queues What new functions would you put in your stack.h? and which of the list.h functions would each call? What new functions would you put in your queue.h? and which of the list.h r functions would each call?Explanation / Answer
In stack.h header file:
void push(st * header);
In side push function I will put InsertAtFront();
st * pop();
Inside pop function I will put RemoveFromFront();
In queue.h header file.
void enqueue(st * head);
in side enqueue function I will put insertAtBack()
st * dQueue();
inside dQueue function I will put RemoveFromFront().
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.