Question: Assume that struckt Node { int item; Node* link; }; Write function void list_head_insert(NodePtr&head, int entry); The function should insert a new Node, in which

Assume that

struckt Node

{

int item;

Node* link;

};

Write function void list_head_insert(NodePtr&head, int entry); The function should insert a new Node, in which entry is the value of attribute item, in front of the linked list that is pointed by head.

Write function void list_head_remove(NodePtr& head); The function will remove the first node from the linked list that is pointed by head.

Write function NodePtr list_search(NodePtr head, int target); The function will search through the linked list that is pointed by head and return a NodePtr that points to the Node that contains target as its item. If there is no such Node, NULL will be returned.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!