Question: in C++ please this is the pseudocode and I need the code III. Data structure: *** - listNode class friend of LLStack, LLQueue, LLlist -
III. Data structure: *** - listNode class friend of LLStack, LLQueue, LLlist - data (int) - next (listNode) Method: - constructor (data) //create a node with given data - printNode (node, outFile) in the format as below: (node's data, data of node's next) - LLStack class - listNode top Methods: - constructor (...) // creates a new stack with a dummy node, set the data in the dummy node to -9999 and set next to null: and let top points to the dummy node - buildStack (inFile) // see algorithm below. Implement all other stack operations on your own. Use the following stack operations in buildStack. You may add other operations as needed -push (newNode) // puts new Node at the top of Stack, after the dummy node. listNode pop(...) if stack is empty returns mull, otherwise deletes and returns the top node of Stack bool isEmpty / if Stack is empty retums true. Otherwise retums false - printStack (outFileh / DO NOT delete nodes in Stack Outputs to outFilel. the entire stack, including dummy node, you may call printNode...) using the following format: ustaw, N. NULL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
