Question: Implement a linked list of integer numbers. The first node of the linked list is pointed by the pointer Ptr . You can consider that

Implement a linked list of integer numbers. The first node of the linked list is pointed by the pointer Ptr. You can consider that each node is of the following type: struct Node { int Item; Node* Next; } By considering that the first node of the linked list is pointed by Ptr, implement the following functions: bool IsEmpty(Node* Ptr): This function returns true if the linked list is empty. Otherwise, it returns false. int GetLength(Node* Ptr): This function returns the number of elements in the linked list. Node* FindItem(Node* Ptr, int ItemToFind): This function returns the pointer of the first node that contains the item ItemToFind. If the item does not exist, the function returns a null pointer. void InsertItem(Node* Ptr, int NewItem): This function adds the NewItem to the linked list. You need to check overflow. void DeleteItem(Node* Ptr, int ItemToDelete): This function deletes the first node of the linked list that contains the item ItemToDelete. If the item does not exists, the function does not delete a node. You need to check underflow. void Print(Note* Ptr): This function prints all the elements in the linked list.

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 Programming Questions!