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

. 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. Sample input/output: How many integer elements you want in a linked list? 5 Enter the elements: 518792 The link list has been created. Enter 1 to know if the list is empty. Enter 2 to know the number of elements in the list. Enter 3 to insert an item. Enter 4 to delete an item. Enter 5 to print all the items. 1 The list is not empty. Enter 1 to know if the list is empty. Enter 2 to know the number of elements in the list. Enter 3 to insert an item. Enter 4 to delete an item. Enter 5 to print all the items. 2 The number of elements is 5. Page 3 of 3 Enter 1 to know if the list is empty. Enter 2 to know the number of elements in the list. Enter 3 to insert an item. Enter 4 to delete an item. Enter 5 to print all the items. 3 Enter the item that you want to insert: 8 The item has been added. Enter 1 to know if the list is empty. Enter 2 to know the number of elements in the list. Enter 3 to insert an item. Enter 4 to delete an item. Enter 5 to print all the items. 4 Enter the item that you want to delete: 4 The item does not exist. Enter 1 to know if the list is empty. Enter 2 to know the number of elements in the list. Enter 3 to insert an item. Enter 4 to delete an item. Enter 5 to print all the items. 4 Enter the item that you want to delete: 9 The item has been deleted. Enter 1 to know if the list is empty. Enter 2 to know the number of elements in the list. Enter 3 to insert an item. Enter 4 to delete an item. Enter 5 to print all the items. 5 The elements are:

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!